Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fade in/out Splash screen
#1
Is it possible to have a dialog window Fade in or out (Transparent to fully visible or vice versa over a couple second span)?

Thanks,
Jason
#2
Function dialog_fade
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

hDlg=ShowDialog("dialog_fade" &dialog_fade 0 0 1)

AnimateWindow hDlg 2000 AW_BLEND ;;use this
;for(_i 0 256 2) Transparent hDlg _i; 0.015; if(!_i) hid- hDlg ;;or this

opt waitmsg 1
3

;AnimateWindow hDlg 2000 AW_BLEND|AW_HIDE ;;use this (does not work well on Windows 7)
for(_i 256 0 -2) 0.015; Transparent hDlg _i ;;or this
clo hDlg

;BEGIN DIALOG
;0 "" 0x80C808C8 0x0 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2030300 "*" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#3
Beautiful, thanks Gin!
#4
Hi Gin,

Just one more question about the code above. How would I set the dialog to appear in the bottom right corner of the screen? I will be using the fade in/out as a notifier for a tray icon.

Thanks
#5
hDlg=ShowDialog("dialog_fade" &dialog_fade 0 0 1 0 0 0 -1 -1)
#6
Fantastic! Thank you


Forum Jump:


Users browsing this thread: 1 Guest(s)