sample_Win2Tray - ; Win2Tray - by Holger Kotsch ;...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ; Win2Tray - by Holger Kotsch ; #NoTrayIcon # #include <GUIConstants.au3> #include "ModernMenu.au3" # If Not IsDeclared("GW_OWNER") Then Global Const $GW_OWNER = 4 If Not IsDeclared("GWL_EXSTYLE") Then Global Const $GWL_EXSTYLE = -20 If Not IsDeclared("WM_GETICON") Then Global Const $WM_GETICON = 0x007F If Not IsDeclared("GCL_HICONSM") Then Global Const $GCL_HICONSM = -34 If Not IsDeclared("GCL_HICON") Then Global Const $GCL_HICON = -14 If Not IsDeclared("PROCESS_QUERY_INFORMATION") Then Global Const $PROCESS_QUERY_INFORMATION = 0x0400 If Not IsDeclared("PROCESS_VM_READ") Then Global Const $PROCESS_VM_READ = 0x0010 Dim $arTrayWin[500][3] ; TrayIconID, WinTitle, WinHandle $arTrayWin[0][0] = 0 $ $nTrayIcon1 = _TrayIconCreate("Win2Tray", "shell32.dll", -13) _TrayIconSetClick(-1, 16) _TrayIconSetState() ; Show the tray icon _ $TrayAbout = _TrayCreateItem(-1, "About") _TrayItemSetIcon(-1, "shell32.dll", -24) _TrayCreateItem(-1, "") _TrayItemSetIcon(-1, "", 0) $TrayExit = _TrayCreateItem(-1, "Exit") _TrayItemSetIcon(-1, "shell32.dll", -28) _ $nChkStart = TimerInit() $ While 1 If TimerDiff($nChkStart) >= 500 Then CheckWindows() $nChkStart = TimerInit() EndIf E $Msg = GUIGetMsg() $ Switch $Msg Case $GUI_EVENT_CLOSE, $TrayExit ExitLoop E Case $TrayAbout MsgBox(0, "About", "Minimize all windows to the tray.") EndSwitch WEnd W _TrayIconDelete($nTrayIcon1) _ ; Restores all windows before exit...
View Full Document

This note was uploaded on 01/31/2011 for the course CS 302 taught by Professor J.parker during the Spring '08 term at University of Texas at Austin.

Page1 / 6

sample_Win2Tray - ; Win2Tray - by Holger Kotsch ;...

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

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