sampleGUIandTray - #include <GUIConstants.au3>...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <GUIConstants.au3> ;#include "ModernMenu.au3" #include "ModernMenuRaw.au3" ; Only unknown constants are declared here # #NoTrayIcon # $hMainGUI = GUICreate("Sample Menu") = ;$bUseAdvMenu = TRUE ; Global variable to switch on/off advanced menu, default is TRUE ;$bUseAdvTrayMenu = TRUE ; Global variable to switch on/off advanced tray menu, default is TRUE ;$bUseRGBColors = FALSE; Global variable to change color mode, set TRUE to use RGB color values, default is FALSE u ; Set default color values - BGR-values! SetGreenMenuColors() SetBlueTrayColors() ;SetOLBlueColors() ; near blue outlook 2003 style ;SetOLSilverColors() ; near silver outlook 2003 style ; ; Set flash timeout for tray flashing icons (milliseconds) - default are 750, minimum is 50 _SetFlashTimeOut(250) ; _SetFlashTimeOut() - set back to default ; ; To activate flashing use _TrayIconSetState($ID, 4) ; To dactivate flashing use _TrayIconSetState($ID, 8) ; ; !!! To delete menu items please use: ; _TrayDeleteItem($nID) ; or ; _GUICtrlODMenuItemDelete($nID) ; !!! ; ; File-Menu $FileMenu $nSideItem1 = _CreateSideMenu($FileMenu) _SetSideMenuText($nSideItem1, "My File Menu") _SetSideMenuColor($nSideItem1, 0xFFFFFF) ; default color - white _SetSideMenuBkColor($nSideItem1, 0x921801) ; bottom start color - dark blue _SetSideMenuBkGradColor($nSideItem1, 0xFBCE92) ; top end color - light blue _ ; You can also set a side menu bitmap ; !Must be min. 8bppand "bmp"-format ; Samples: ; _SetSideMenuImage($nSideItem1, "test.exe", 178) ; Load the bitmap resource ordinal number 178 from 'test.exe' ; _SetSideMenuImage($nSideItem1, "mydll.dll", "#120") ; Load the bitmap resource with name '120' from 'mydll.dll' w $OpenItem .." & @Tab & "Ctrl+O", $FileMenu) _GUICtrlODMenuItemSetIcon(-1, "shell32.dll", -4) _GUICtrlODMenuItemSetSelIcon(-1, "shell32.dll", -5) $SaveItem = _GUICtrlCreateODMenuItem("&Save" & @Tab & "Ctrl+S", $FileMenu, "shell32.dll", -7) _GUICtrlODMenuItemSetSelIcon(-1, "shell32.dll", -79)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
_GUICtrlCreateODMenuItem("", $FileMenu) ; Separator $RecentMenu = _GUICtrlCreateODMenu("Recent Files", $FileMenu) _GUICtrlCreateODMenuItem("", $FileMenu) ; Separator $ExitItem = _GUICtrlCreateODMenuItem("E&xit", $FileMenu, "shell32.dll", -28) - ; Tools-Menu $ToolsMenu $CalcItem = _GUICtrlCreateODMenuItem("Calculator", $ToolsMenu, "calc.exe", 0) $CmdItem = _GUICtrlCreateODMenuItem("CMD", $ToolsMenu, "cmd.exe", 0) $EditorItem = _GUICtrlCreateODMenuItem("Editor", $ToolsMenu, "notepad.exe", 0) $RegeditItem = _GUICtrlCreateODMenuItem("Regedit", $ToolsMenu, "regedit.exe", 0) 0 ; View-Menu $ViewMenu $ViewColorMenu = _GUICtrlCreateODMenu("Menu Colors", $ViewMenu, "mspaint.exe", 0) $nSideItem2 = _CreateSideMenu($ViewColorMenu) _SetSideMenuText($nSideItem2, "Choose a color") _SetSideMenuColor($nSideItem2, 0x00FFFF) _SetSideMenuBkColor($nSideItem2, 0xD00000)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

sampleGUIandTray - #include &lt;GUIConstants.au3&gt;...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online