刪除托盤菜單的菜單/菜單項目.
TrayItemDelete ( 控件ID )
控件ID | 由 TrayCreateItem 或 TrayCreateMenu 函數(shù)返回的控件標(biāo)識符. |
成功: | 返回 1. |
失敗: | 返回 0. |
#NoTrayIcon
Opt("TrayMenuMode", 1) ;
不顯示默認(rèn)菜單(腳本暫停/退出).
Local $delitem
= TrayCreateItem("刪除")
TrayCreateItem("")
Local $aboutitem
= TrayCreateItem("關(guān)于...")
TrayCreateItem("")
Local $exititem
= TrayCreateItem("退出")
TraySetState()
While 1
Local
$msg = TrayGetMsg()
Select
Case $msg = 0
ContinueLoop
Case $msg = $aboutitem
MsgBox(64, "關(guān)于:","AutoIt3-托盤菜單示例")
Case $msg = $delitem
TrayItemDelete($delitem)
Case $msg = $exititem
ExitLoop
EndSelect
WEnd
Exit
provider with jb51.net (unicode) |