函数说明

GUICtrlDelete

删除指定控件。

GUICtrlDelete ( 控件ID )

 

参数

控件ID 控件标识符,可由 GUICtrlCreate... 的返回值获得。

 

返回值

成功: 返回值为1。
失败: 返回值为0。

 

注意

本函数目前还未能用于删除右键菜单控件。

 

相关

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 ()

; 运行脚本直到窗口被关闭
Do
    $msg = GUIGetMsg()
    if $msg = $del then
        GUICtrlDelete($date)
        GUICtrlDelete($del)
    endif
Until $msg = $GUI_EVENT_CLOSE