如下测试代码 要求 右键-关于 弹出 右键菜单
#include <ModernMenuRaw.au3>
#NoTrayIcon
$nTrayIcon1 = _TrayIconCreate("托盘菜单示例", "shell32.dll", -40)
$bUseAdvTrayMenu = FALSE;菜单样式(可取值 TRUE 和 False)
$nTrayMenu1 = _TrayCreateContextMenu()
$aboutitem = _TrayCreateItem("关于")
_TrayItemSetIcon($aboutitem, "shell32.dll", -24)
$TrayExit = _TrayCreateItem("退出")
_TrayItemSetIcon(-1, "shell32.dll", -28)
_TrayIconSetState()
While 1
$Msg = GUIGetMsg()
Select
Case $Msg = $TrayExit
ExitLoop
Case $msg = $aboutitem
Msgbox(64,"关于","托盘菜单示例")
EndSelect
WEnd
_TrayIconDelete($nTrayIcon1);退出菜单
|