flxfxp Posted October 12, 2009 Share Posted October 12, 2009 I'd like to hide the taskbar entry to maximize effective space since the app has a systray icon, i dont need the taskbar entry. The app doesnt allow you to only have a systray instead of both. How can I hide a taskbar entry but keep the window form? Thanks, Dennis Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 12, 2009 Moderators Share Posted October 12, 2009 flxfxp,One way is to use the $WS_EX_TOOLWINDOW style:#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Test", 500, 500, -1, -1, Default, $WS_EX_TOOLWINDOW) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndBut it does mean you lose the icon on the titlebar and only get a small [X] (on Vista at least!).M23 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...
flxfxp Posted October 12, 2009 Author Share Posted October 12, 2009 Hi Melba, Thanks for the suggestion, but I meant on a existing app. Its program code is beyond my control. Thanks, Dennis Link to comment Share on other sites More sharing options...
picea892 Posted October 12, 2009 Share Posted October 12, 2009 one way is to change the parent to the desktop window which does not have a taskbar button. The problem with this solution is the window will always be behind all other windows...same as the desktop run("calc") WinWaitActive("Calculator", "") $origParent = DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle("Calculator", ""), "hwnd", WinGetHandle("Program Manager")) Link to comment Share on other sites More sharing options...
flxfxp Posted October 12, 2009 Author Share Posted October 12, 2009 one way is to change the parent to the desktop window which does not have a taskbar button. The problem with this solution is the window will always be behind all other windows...same as the desktop run("calc") WinWaitActive("Calculator", "") $origParent = DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle("Calculator", ""), "hwnd", WinGetHandle("Program Manager")) Hey picea892, this works on calculator, but the app in question is Foobar2000, I can't get it working for that program. Changed Calculator handles to foobar2000 but no cigar. Suggestions? Link to comment Share on other sites More sharing options...
picea892 Posted October 12, 2009 Share Posted October 12, 2009 (edited) Hi You need to use autoit3info to get the correct title of the foobar window. My version may be different, but this works for mine. I have also included how to undo the effect. $foobar=WinGetHandle("foobar2000 v0.9.6.9", "") $origParent = DllCall("user32.dll", "int", "SetParent", "hwnd", $foobar, "hwnd", WinGetHandle("Program Manager")) sleep(6000) $origParent2 = DllCall("user32.dll", "int", "SetParent", "hwnd", $foobar, "hwnd", $origParent[0]) ps: Open foobar first Edited October 12, 2009 by picea892 Link to comment Share on other sites More sharing options...
flxfxp Posted October 12, 2009 Author Share Posted October 12, 2009 (edited) Hi You need to use autoit3info to get the correct title of the foobar window. My version may be different, but this works for mine. I have also included how to undo the effect. $foobar=WinGetHandle("foobar2000 v0.9.6.9", "") $origParent = DllCall("user32.dll", "int", "SetParent", "hwnd", $foobar, "hwnd", WinGetHandle("Program Manager")) sleep(6000) $origParent2 = DllCall("user32.dll", "int", "SetParent", "hwnd", $foobar, "hwnd", $origParent[0]) ps: Open foobar first Awesome! The only problem I have left is that my Window Title changes according to the song, is there a way to be sure that it always grabs correctly? P.s I use Litestep and it doesn't seem to work in that shell, is there a way to fix this? Edited October 12, 2009 by flxfxp Link to comment Share on other sites More sharing options...
picea892 Posted October 12, 2009 Share Posted October 12, 2009 Hmmm, in these cases I usually use class. Again, need to check with autoit3info to make sure your class is the same $foobar=WinGetHandle("[CLASS:{97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}]", "") $origParent = DllCall("user32.dll", "int", "SetParent", "hwnd", $foobar, "hwnd", WinGetHandle("Program Manager")) sleep(6000) $origParent2 = DllCall("user32.dll", "int", "SetParent", "hwnd", $foobar, "hwnd", $origParent[0]) Link to comment Share on other sites More sharing options...
somdcomputerguy Posted October 12, 2009 Share Posted October 12, 2009 WinTitleMatchMode (Option) - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
flxfxp Posted October 12, 2009 Author Share Posted October 12, 2009 Thanks guys, got it! Dennis 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