Taskms4 Posted September 2, 2019 Share Posted September 2, 2019 (edited) Greetings, I didn't want to necro an old post, so I'm starting a new one... Like the OP of this post, I'm trying to create a "Tool" GUI (similar to Windows 7 gadgets) and I would need to force the GUI to stay "always up" even when Win + D is pressed. The solution given on the previous post seems to be working on Win7 but I tried it on Win10 and it does not work.. Any kind of help would be appreciated Thanks in advance, --Taskms4 Edited September 2, 2019 by Taskms4 (marked as solved) Link to comment Share on other sites More sharing options...
Nine Posted September 2, 2019 Share Posted September 2, 2019 How about : GUICreate ("Test",200,200,-1,-1,$WS_CAPTION+$WS_POPUP,$WS_EX_TOPMOST) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Taskms4 Posted September 2, 2019 Author Share Posted September 2, 2019 (edited) @Nine Thanks for your reply, I forgot to mention that I don't want my GUI to be "TopMost" But you're right, the $WS_EX_TOPMOST prevent it to be hidden by Win+D, unfortunately I cannot use it in my case... Edited September 2, 2019 by Taskms4 Link to comment Share on other sites More sharing options...
Nine Posted September 2, 2019 Share Posted September 2, 2019 Works for me on Win 10 : Global $hDesktop = WinGetHandle("Program Manager") Global $hGui = GUICreate("Test", 200, 200, -1, -1, $WS_POPUP+$WS_CAPTION) _WinAPI_SetWindowLong($hGui, $GWL_HWNDPARENT, $hDesktop) Taskms4 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Taskms4 Posted September 2, 2019 Author Share Posted September 2, 2019 Strange.. Where do you place this piece of code in your script? Link to comment Share on other sites More sharing options...
Nine Posted September 2, 2019 Share Posted September 2, 2019 This works even better for me Win10 + Win7 : #include <Constants.au3> #include <GUIConstants.au3> #include <WinAPI.au3> #include <Array.au3> #include <WinAPISysWin.au3> Opt("MustDeclareVars", 1) Global $hDesktop = WinGetHandle("Program Manager") Local $aChild = _WinAPI_EnumChildWindows ($hDesktop,False) ; _ArrayDisplay ($aChild) $hDesktop = $aChild[1][0] Global $hGui = GUICreate("Test", 200, 200, -1, -1, $WS_POPUP+$WS_CAPTION) _WinAPI_SetWindowLong($hGui, $GWL_HWNDPARENT, $hDesktop) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Inpho 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Taskms4 Posted September 2, 2019 Author Share Posted September 2, 2019 @Nine my apologies you were right! The following code (from the old post) is not working for me: Global $hDesktop = ControlGetHandle("[CLASS:Progman]", "", "SysListView321") Global $hGui = GUICreate("Non Minimizable", 500, 500, -1, -1, $WS_MAXIMIZEBOX) _WinAPI_SetWindowLong($hGui, $GWL_HWNDPARENT, $hDesktop) But yours works perfectly fine 😮 Global $hDesktop = WinGetHandle("Program Manager") Global $hGui = GUICreate("Test", 200, 200, -1, -1, $WS_POPUP+$WS_CAPTION) _WinAPI_SetWindowLong($hGui, $GWL_HWNDPARENT, $hDesktop) Thank you so much! 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