刪除指定控件。
GUICtrlDelete ( 控件ID )
參數(shù)
控件ID | 控件標(biāo)識符,可由 GUICtrlCreate... 的返回值獲得。 |
返回值
成功: | 返回值為1。 |
失敗: | 返回值為0。 |
注意
本函數(shù)目前還未能用于刪除右鍵菜單控件。
相關(guān)
GUICreate, GUICtrlCreate...
示例
#include <GUIConstants.au3>
GUICreate ( "我的 GUI 之刪除控件", 200,200,800,200)
$date=GUICtrlCreateDate ("1953/04/25", 10,10,185,20 )
$del=GUICtrlCreateButton("刪除控件", 50,50,70,20 )
GUISetState ()
; 運(yùn)行腳本直到窗口被關(guān)閉
Do
$msg = GUIGetMsg()
if $msg = $del then
GUICtrlDelete($date)
GUICtrlDelete($del)
endif
Until $msg = $GUI_EVENT_CLOSE