Diana (Cda) Posted September 19, 2011 Share Posted September 19, 2011 Is there any way to have a standard GUI we create open minimized to the taskbar rather than popping up as per usual in the screen? I'm in a very visual spot in the office and don't really need everyone passing by seeing my reminders, etc., that I control via AI GUIs. All searches I've done give results that deal with minimizing to the taskbar only. Thanks. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2011 Moderators Share Posted September 19, 2011 (edited) Diana (Cda), That was more difficult than I thought it should be. I am sure that someone else will come up with a better solution, They have see below!! but until then this should keep your reminders secret until you want to see them: #include <GUIConstantsEx.au3> ; Create the GUI off the screen $hGUI = GUICreate("Test", 500, 500, @DesktopWidth, @DesktopHeight) ; It seems we need to show it before... GUISetState(@SW_SHOW) ; ...we can minimize it to the taskbar GUISetState(@SW_MINIMIZE) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_RESTORE ; When the GUI is restored ; Check its position $aPos = WinGetPos($hGUI, "") ; If it is still off screen - i.e this is the first restore If $aPos[0] = @DesktopWidth And $aPos[1] = @DesktopHeight Then ; Then move it onto the screen at the position required WinMove($hGUI, "", 100, 100) EndIf EndSwitch WEndAs you can see I found that you needed to SHOW the GUI before you could MINIMIZE it to the taskbar - so I created it off-screen. This gives the impression that the taskbar button slides in from the right on my machine. Then when you restore it from the taskbar, the script moves it to where you require. If you move it again and reminimize, then it will restore at the new position. All clear? M23 Edited September 19, 2011 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
rover Posted September 19, 2011 Share Posted September 19, 2011 (edited) seems as good a time as any to bring this up. you want @SW_SHOWMINIMIZED shown in _WinAPI_ShowWindow GUISetState(@SW_SHOWMINIMIZED) these macros should also be listed for GUISetState() in the help file Edited September 19, 2011 by rover I see fascists... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2011 Moderators Share Posted September 19, 2011 (edited) rover, I knew there would be a better way! M23 Edit: I suggest you post this amendment in the sticky thread in Developer Chat. Edit: I see you have! Edited September 19, 2011 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
rover Posted September 19, 2011 Share Posted September 19, 2011 Done! rover, I knew there would be a better way! M23 Edit: I suggest you post this amendment in the sticky thread in Developer Chat. Edit: I see you have! that was fast I see fascists... Link to comment Share on other sites More sharing options...
rover Posted September 19, 2011 Share Posted September 19, 2011 I've known of that one for some time, but never got around to submitting it. seemed too trivial for TRAC, but since the help file thread was created it was about time I brought that up. I see fascists... 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