Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "win32api.inc"
#Resource "status.pbr"
%ID_Timer = 500
Global hDlg As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "Toolbar Test",400,400,200,100, %WS_OverlappedWindow To hDlg
Dialog Set Icon hDlg, "main"
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_InitDialog
SetTimer(hDlg, %ID_Timer, 50&, %NULL) 'sends %WM_Timer to dialog callback
Case %WM_Timer
Static iImage As Long
Incr iImage : If iImage > 30 Then iImage = 1
Dialog Set Icon hDlg, "#"+Trim$(Str$(iImage))
Dialog Set Text hDlg, Time$
End Select
End Function
'gbs_00759
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm