Hi Rene,
I think it is still valid, but you can have a global timer callback this way - with named dialog:
Uses "UI", "Console"
' -- ID numbers of controls
Begin ControlID
%bClose
End ControlID
Begin Const
%MAIN_WIDTH = 320
%MAIN_HEIGHT = 240
End Const
' -- Create dialog here
Function TBMain()
Local hDlg As DWord
Dialog New Pixels, name "Main", 0, "My dialog",-1,-1, %MAIN_WIDTH, %MAIN_HEIGHT, %WS_POPUP | %WS_VISIBLE | %WS_CAPTION | %WS_SYSMENU | %WS_MINIMIZEBOX To hDlg
' -- Place controls here
Control Add Button name "CloseButton", hDlg, %bClose, "Click to close", %MAIN_WIDTH-105, %MAIN_HEIGHT-30, 100, 25
Dialog Show Modal hDlg', Call cbDialog
End Function
callback function Main_OnLoad()
printl "init"
Dialog Set Timer cbhndl, 1, 1000
end function
callback function Main_OnTimer()
printl cbhndl, cbctl
end function
callback function Main_OnDestroy()
printl "de-init"
sleep 1000
Dialog kill Timer cbhndl, 1
end function
'
callback function CloseButton_OnClick()
Dialog End CBHNDL
end function
Bookmarks