finebbs Posted October 29, 2008 Posted October 29, 2008 (edited) When click "Change", the last two lines of _new() haven't work.Maybe the UDF(ModernMenuRaw.au3) have some bugs.(the original UDF's url: http://www.autoitscript.com/forum/index.php?showtopic=20967)The code:expandcollapse popup#include <ModernMenuRaw.au3> #include <GUIConstantsEx.au3> #include <GUIConstants.au3> #NoTrayIcon $hwnd = GUICreate("Test ", 200, 100, -1, -1) $Label1 = GUICtrlCreateLabel("Today is: "&@YEAR&@MON&@MDAY, 10, 10) $Label2 = GUICtrlCreateLabel("This is a test.", 10, 40) $Button1=GUICtrlCreateButton("Change",20,70,60,25) GUISetState() $nTrayIcon1 = _TrayIconCreate("Test", "shell32.dll", -40) _TrayIconSetClick($nTrayIcon1, 16) _TrayIconSetState() $bUseAdvTrayMenu = FALSE $nTrayMenu1 = _TrayCreateContextMenu() $nSideItem3 = _CreateSideMenu($nTrayMenu1) _SetSideMenuText($nSideItem3, "Test") _SetSideMenuColor($nSideItem3, 0x00FFFF) _SetSideMenuBkColor($nSideItem3, 0x802222) _SetSideMenuBkGradColor($nSideItem3, 0x4477AA) $help= _TrayCreateItem("Help") _TrayItemSetIcon($help , "shell32.dll", -15) $About = _TrayCreateItem("About") _TrayItemSetIcon($About, "shell32.dll", -25) $TrayExit = _TrayCreateItem("Exit") _TrayItemSetIcon($TrayExit, "shell32.dll", -28) _TrayIconSetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE _TrayIconDelete($nTrayIcon1) Exit Case $msg = $Button1 _new() Case $msg = $TrayExit _TrayIconDelete($nTrayIcon1) Exit EndSelect WEnd Func _new() GUICtrlSetState($Label1,$GUI_Hide) GUICtrlSetState($Label2,$GUI_Hide) $Label3 = GUICtrlCreateLabel(@OSVersion&@OSServicePack, 10, 10) $Label4 = GUICtrlCreateLabel(@OSBuild, 10, 40) EndFunc _TrayIconDelete($nTrayIcon1) Edited October 29, 2008 by finebbs
Zedna Posted October 29, 2008 Posted October 29, 2008 (edited) When click "Change", the last two lines of _new() haven't work.Maybe the UDF(ModernMenuRaw.au3) have some bugs. (the original UDF's url: http://www.autoitscript.com/forum/index.php?showtopic=20967) Then try to remove #include <ModernMenuRaw.au3> if it helps. Edited October 29, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
finebbs Posted October 30, 2008 Author Posted October 30, 2008 Then try to remove #include <ModernMenuRaw.au3> if it helps. It's not a solution. I want to use ModernMenuRaw.au3.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now