06-14-2006, 11:48 AM
Thank you, i implemented this functionality in my function now and all works great :lol:
;*******************************************
;,ShowSplash v1.1
;*******************************************
;This is to show our Splash Screen
;*******************************************
\Dialog_Editor
function# [hDlg] [message] [wParam] [lParam]
if(hDlg) goto messages
str-- sTitle = "Welcome to the JobSystem for DragonRaja."
str dd=
;BEGIN DIALOG
;0 "" 0x90C00A44 0x80 0 0 300 140 ""
;1 Button 0x54030001 0x4 126 124 48 14 "OK"
;2 Button 0x44030000 0x4 250 124 48 14 "Cancel"
;3 Static 0x5400100E 0x20000 12 12 37 70 ""
;4 Static 0x54000000 0x0 48 0 300 140 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2010806 "" ""
str controls = "0 3 4"
str f
str sb3my.expandpath("$my qm$\DragonRaja\images\Tri-Moon.gif")
str st4 = " [9]All initialisations are done, and system is up and running."
st4 + _s.getmacro("Readme.License")
st4 + _s.getmacro("Readme.Introduction")
opt waitmsg 1
if(!ShowDialog(dd &ShowSplash &controls 0 2)) ret
opt waitmsg -1
ret
;messages
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
;int param=DT_GetParam(hDlg)
int-- t
sel message
,case WM_INITDIALOG
,,t=120 ;;120 seconds
,,f.format("%s - %im%is", sTitle, t/60, t%60)
,,f.setwintext(hDlg)
,,SetTimer hDlg 1 1000 0
,,ret 1
,case WM_TIMER
,,t-1
,,if(t<1)
,,,KillTimer(hDlg 1)
,,,clo hDlg
,,else
,,,f.format("%s - %im%is", sTitle, t/60, t%60)
,,,f.setwintext(hDlg)
,case WM_DESTROY
,,KillTimer hDlg 1
,,DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1
Well thats all for now, 3M

