下面这段代码右键菜单点击没反应,请高手修改一下!#include <Constants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include<ie.au3>
#include <ButtonConstants.au3>
Opt("TrayIconHide", 1)
Opt("TrayMenuMode",1)
Opt("TrayOnEventMode",1)
$prefsitem = TrayCreateItem("参数")
TrayCreateItem("")
$aboutitem = TrayCreateItem("关于")
TrayCreateItem("")
$exititem = TrayCreateItem("退出")
$oIE = _IECreateEmbedded ()
$Form1 = GUICreate(" 百度",860,632, -1,-1 , 0x04000000 + 0x00CF0000)
$GUIActiveX = GUICtrlCreateObj($oIE, 2, 2, 880, 680)
GUICtrlSetResizing($GUIActiveX , 0x0001)
GUISetState(@SW_SHOW)
TraySetOnEvent($TRAY_EVENT_PRIMARYUP,"tray")
_IENavigate ($oIE, "http://www.baidu.com")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_MINIMIZE
GUISetState(@SW_HIDE, $Form1)
Opt("TrayIconHide", 0)
Case $prefsitem
Msgbox(64, "参数:", "系统版本:" & @OSVersion)
Case $aboutitem
Msgbox(64, "关于:", "AutoIt3-托盘-例子.")
EndSwitch
WEnd
Func tray()
Opt("TrayIconHide", 1)
GUISetState(@SW_SHOW, $Form1)
WinActivate($Form1)
EndFunc
|