Show/Hide the StatusBar control
#include <GuiStatusBar.au3>
_GUICtrlStatusBar_ShowHide ( $hWnd, $iState )
$hWnd | Handle to the control |
$iState | State of the StatusBar, can be the following values: @SW_SHOW @SW_HIDE |
True: | the control was previously visible. |
False: | the control was previously hidden. |
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Create GUI
Local $hGUI = GUICreate("StatusBar ShowHide (v" & @AutoItVersion & ")", 400, 300)
; defaults to 1 part, no text
Local $hStatus = _GUICtrlStatusBar_Create($hGUI)
GUISetState(@SW_SHOW)
; Set parts
Local $aParts[3] = [75, 150, -1]
_GUICtrlStatusBar_SetParts($hStatus, $aParts)
_GUICtrlStatusBar_SetText($hStatus, "Part 0")
_GUICtrlStatusBar_SetText($hStatus, "Part 1", 1)
_GUICtrlStatusBar_SetText($hStatus, "Part 2", 2)
MsgBox($MB_SYSTEMMODAL, "Information", "Hide StatusBar")
_GUICtrlStatusBar_ShowHide($hStatus, @SW_HIDE)
Sleep(2000)
MsgBox($MB_SYSTEMMODAL, "Information", "Show StatusBar")
_GUICtrlStatusBar_ShowHide($hStatus, @SW_SHOW)
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example