ycomp Posted April 7, 2008 Share Posted April 7, 2008 Hi, How can I change the system tray icon? I set my main icon from the IDE in the Compile Dialog... however I would like to change it to a different icon when my program is "thinking".. (user is waiting) and then restore the original icon in the system tray when it has completed that task. How can I do this? Link to comment Share on other sites More sharing options...
monoceres Posted April 7, 2008 Share Posted April 7, 2008 Look what I found: TraySetIcon() Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Developers Jos Posted April 7, 2008 Developers Share Posted April 7, 2008 (edited) example from the SciTE4AutoIt3 Helpfile (requires the full SciTE4Autoit3 package installed): #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\au3.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype1.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype2.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype3.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype-blank.ico #include <GUIConstants.au3> GUICreate("Demo resource ICO's") $h_Button1 = GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON) GUISetState() For $x = 0 To 7 $rc = TraySetIcon(@ScriptFullPath, -$x) $rc2 = GUICtrlSetImage($h_Button1, @ScriptFullPath, -$x) If $x < 3 Then TrayTip("Default ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) Else TrayTip("New ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) EndIf Sleep(2000) Next GUIDelete() Edited April 7, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ycomp Posted April 7, 2008 Author Share Posted April 7, 2008 I had search help and looked in index for icon, icons... but found nothing... didn't think to look under "tray". Thanks for the tip... and Jos, thanks for the code. Link to comment Share on other sites More sharing options...
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