找回密码
 加入
搜索
查看: 2086|回复: 0

[GUI管理] 如何对托盘菜单 的项目 再建立右键菜单?

  [复制链接]
发表于 2017-6-18 10:53:32 | 显示全部楼层 |阅读模式
如下测试代码  要求 右键-关于  弹出 右键菜单


#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);退出菜单
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-3-28 23:13 , Processed in 0.072507 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表