Function Reference

_GUICtrlStatusBar_ShowHide

StatusBarコントロールの表示/非表示を切り替えます。

#Include <GuiStatusBar.au3>
_GUICtrlStatusBar_ShowHide($hWnd, $iState)

 

パラメータ

$hWnd コントロールのハンドル
$iState ステータスバーの状態 :
@SW_SHOW
@SW_HIDE

 

返し値

True: コントロールは切り替え前は表示されていました
False: コントロールは切り替え前は非表示でした

 

注意

なし。

 

関連

 


#include <GuiConstantsEx.au3>
#include <GuiStatusBar.au3>

Opt('MustDeclareVars', 1)

$Debug_SB = False ; 関数に渡されるClassNameを調べる。動作を確認するにはTrueを設定し、他のコントロールのハンドルを使用

_Main()

Func _Main()

    Local $hGUI, $hStatus
    Local $aParts[3] = [75, 150, -1]
   
    ; GUIを作成
    $hGUI = GUICreate("StatusBar Show/Hide", 400, 300)

    ;===============================================================================
    ; デフォルト 1パーツ、テキストなし
    $hStatus = _GUICtrlStatusBar_Create ($hGUI)
    ;===============================================================================
    _GUICtrlStatusBar_SetParts ($hStatus, $aParts)

    GUISetState()

    MsgBox (4160, "Information", "Hide StatusBar")
    _GUICtrlStatusBar_ShowHide ($hStatus, @SW_HIDE)
    MsgBox (4160, "Information", "Show StatusBar")
    _GUICtrlStatusBar_ShowHide ($hStatus, @SW_SHOW)

    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main