Posts: 1,769
Threads: 410
Joined: Feb 2003
I'd like to build a timer that does hours:minutes
econds but thought I'd not recreate the wheel.
Has anyone found it in like an Active-X object or something like that?
Posts: 12,072
Threads: 140
Joined: Dec 2002
Function
Dialog73
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
if(!ShowDialog("Dialog73" &Dialog73)) ret
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;4 Button 0x54032000 0x0 4 6 48 14 "Start"
;5 Button 0x54032000 0x0 56 6 48 14 "Stop"
;3 Edit 0x54030880 0x200 4 24 100 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030003 "" "" ""
ret
;messages
long- t0
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_TIMER
,long t
,GetSystemTimeAsFileTime +&t
,t-t0
,int h m s ms
,ms=t/10000
,s=t/10000000
,m=s/60
,h=m/60
,ms%1000
,m%60
,s%60
,_s.format("%02i:%02i:%02i:%03i" h m s ms)
,_s.setwintext(id(3 hDlg))
ret
;messages2
sel wParam
,case 4
,_s.setwintext(id(3 hDlg))
,GetSystemTimeAsFileTime +&t0
,SetTimer hDlg 1 1 0
,case 5 KillTimer hDlg 1
,case IDOK
,case IDCANCEL
ret 1
Posts: 1,769
Threads: 410
Joined: Feb 2003
wow....thats fantastic. thanks!!!!