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 Icon, 7100, "capprog.ico"
#Resource Icon, 01, "prog1.ico"
#Resource Icon, 02, "prog2.ico"
#Resource Icon, 03, "prog3.ico"
#Resource Icon, 04, "prog4.ico"
#Resource Icon, 05, "prog5.ico"
#Resource Icon, 06, "prog6.ico"
#Resource Icon, 07, "prog7.ico"
#Resource Icon, 08, "prog8.ico"
#Resource Icon, 09, "prog9.ico"
#Resource Icon, 10, "prog10.ico"
#Resource Icon, 11, "prog11.ico"
#Resource Icon, 12, "prog12.ico"
#Resource Icon, 13, "prog13.ico"
#Resource Icon, 14, "prog14.ico"
#Resource Icon, 15, "prog15.ico"
#Resource Icon, 16, "prog16.ico"
#Resource Icon, 17, "prog17.ico"
#Resource Icon, 18, "prog18.ico"
#Resource Icon, 19, "prog19.ico"
#Resource Icon, 20, "prog20.ico"
#Resource Icon, 21, "prog21.ico"
#Resource Icon, 22, "prog22.ico"
#Resource Icon, 23, "prog23.ico"
#Resource Icon, 24, "prog24.ico"
#Resource Icon, 25, "prog25.ico"
#Resource Icon, 26, "prog26.ico"
#Resource Icon, 27, "prog27.ico"
#Resource Icon, 28, "prog28.ico"
#Resource Icon, 29, "prog29.ico"
#Resource Icon, 30, "prog30.ico"
%ID_Timer = 500
Global hDlg As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "Toolbar Test",400,400,400,300, %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_01142
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm