找回密码
 加入
搜索
查看: 1781|回复: 3

[系统综合] 关于托盘图标菜单udf_ModernMenuRaw[已解决]

[复制链接]
发表于 2017-7-24 16:25:23 | 显示全部楼层 |阅读模式
本帖最后由 lin6051 于 2017-7-24 17:30 编辑

用论坛的 udf ModernMenuRaw 创建的带图标的托盘菜单

重启一下 explorer.exe进程 托盘它就退出了

各位大侠能修复下么?

难道要 双进程 守护下?
win7 64

---------结果
下了个新版也这样,托盘不见了 进程还在
把显示菜单那项_TrayIconSetState() 放入 while 1里面了,初略看了下资源占用情况,正常
发表于 2017-7-24 18:13:10 | 显示全部楼层
本帖最后由 yamakawa 于 2017-7-24 18:15 编辑
;example script shows how WM_TASKBARCREATED message is received
;Author: rover
;if explorer closed or crashed, WM_TASKBARCREATED message received by window after Explorer is re-created
   #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
   #include <guiconstantsex.au3>
   #include <windowsconstants.au3>
   
   Opt('MustDeclareVars', 1)
   
   Global $WM_TASKBARCREATED
   Global $aRet = DllCall("User32.dll", "int", "RegisterWindowMessageW", "wstr", "TaskbarCreated")
   If @error Or UBound($aRet) <> 2 Then Exit
   $WM_TASKBARCREATED = $aRet[0]
   ConsoleWrite('+$WM_TASKBARCREATED = ' & Hex($WM_TASKBARCREATED) & @CRLF)
   
   _Main()
   
   Func _Main()
       GUICreate("WM_TASKBARCREATED", 400, 200)
       GUIRegisterMsg($WM_TASKBARCREATED, "WM_TASKBARCREATED")
       GUISetState()
   
       Do
       Until GUIGetMsg() = $GUI_EVENT_CLOSE
       GUIDelete()
   EndFunc;==>_Main
   
   Func WM_TASKBARCREATED($hWnd, $iMsg, $iwParam, $ilParam)
       #forceref $hWnd, $iMsg, $iwParam, $ilParam
       ConsoleWrite('!WM_TASKBARCREATED = ' & $iMsg & @CRLF)
       Beep(1000, 5)
       Return $GUI_RUNDEFMSG
   EndFunc;==>WM_TASKBARCREATED
来自官网  未测试
发表于 2017-7-30 23:00:45 | 显示全部楼层
厉害了,哥。。。。
发表于 2017-7-30 23:00:58 | 显示全部楼层
相当好。。。。。。。。。。。。。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-23 17:44 , Processed in 0.070476 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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