Date: 02-16-2022
Return to Index
created by gbSnippets
'An online StatusBar control tutorial may be found at:
'http://www.garybeene.com/power/pb-tutor-controls.htm
'Primary Code:
'Syntax: Control Add StatusBar, hDlg, id&, txt$, x, y, xx, yy [, [style&] [, [exstyle&]]] [[,] Call CallBack]
Control Add StatusBar, hDlg, 500, "",0,0,0,0
'Compilable Example: (Jose Includes)
'The following compilable code demonstrates a dialog with a Statusbar control,
'consisting of 3 parts in which information can be displayed.
'The Dialog CallBack response to clicking the Statusbar buttons is demonstrated.
'Controls can also have a Callback function of their own.
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
Global hDlg As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "Statusbar Test",300,300,200,200, %WS_SysMenu, 0 To hDlg
Control Add StatusBar, hDlg, 500, "",0,0,0,0
StatusBar Set Parts hDlg, 500, 75,75,99999
StatusBar Set Text hDlg, 500, 1, 0, "one"
StatusBar Set Text hDlg, 500, 2, 0, "two"
StatusBar Set Text hDlg, 500, 3, 0, "three"
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
If CB.Nmcode = %NM_Click Then
MsgBox "click"
End If
End Function
'gbs_00101
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm