Date: 02-16-2022
Return to Index
created by gbSnippets
'An online tutorial on templates can be found at:
'http://www.garybeene.com/power/pb-tutor-templates.htm
'Use this template by copying everything below "'Copy below here:"
'and put in a file with a ".pbtpl" extension under pbwin90\bin.
'When PB IDE starts, the template will be available under the
'toolbar "Create New File" dropdown menu.
'Copy below here:
1
.bas
Simple: Dialog + Button
#Compile EXE
#Dim All
%Unicode=1
#Include "win32api.inc"
Function PBMain() As Long
Local hDlg As DWord
Dialog New Pixels, 0, "Button Test",300,300,200,200, %WS_OverlappedWindow To hDlg
Control Add Button, hDlg, 100,"Push", 50,10,100,20
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
If CB.Msg = %WM_Command AND CB.Ctl = 100 AND CB.Ctlmsg = %BN_Clicked Then
'test code
End If
End Function
'gbs_00254
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm