找回密码
 加入
搜索
查看: 4248|回复: 2

[原创] 请教一个问题

[复制链接]
发表于 2008-8-30 18:24:28 | 显示全部楼层 |阅读模式
托盘
我制作好一个软件,``然后点窗体上面的最少化,可以直接变成托盘的样子嘛 ,应该要怎么写,  请教高手哈,`
发表于 2008-9-4 00:11:57 | 显示全部楼层
帮助文件里面就有托盘的代码了
你进行修改就可以勒
代码如下

#Include <Constants.au3>
#NoTrayIcon

Opt("TrayMenuMode",1)   ; Default tray menu items (Script Paused/Exit) will not be shown.

$exititem       = TrayCreateItem("Exit")

TraySetIcon("warning")
TraySetToolTip("SOS")

TraySetState()  ; Show the tray icon

$toggle = 0

While 1
    $msg = TrayGetMsg()
    Select
        Case $msg = 0
            Sleep(1000)
            If $toggle = 0 Then
                TraySetState()  ; Show the tray icon
                $toggle = 1
            Else
                TraySetState(2) ; Hide the tray icon
                $toggle = 0
            EndIF
        Case $msg = $exititem
            ExitLoop
    EndSelect
        
WEnd

Exit
发表于 2012-12-18 19:43:36 | 显示全部楼层
求人不如求已
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-3-29 05:45 , Processed in 0.069071 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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