in reply to Re: Win32::GUI: how to find BrowseForFolder()'s handle?
in thread Win32::GUI: how to find BrowseForFolder()'s handle?
Not correct. Like I said in the OP, GetOpenFileName() and GetSaveFileName(), for example, pop up and show at the foreground, on top of all other existing windows. So why should BrowseForFolder() be different? It's the same type of window/interaction.
I can tell just by looking that doesn't compileNot correct. That code compiles fine.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Win32::GUI: how to find BrowseForFolder()'s handle?
by Anonymous Monk on Sep 21, 2012 at 22:28 UTC | |
Not correct. How do you know? Like I said in the OP, GetOpenFileName() and GetSaveFileName(), for example, pop up and show at the foreground, on top of all other existing windows. So why should BrowseForFolder() be different? It's the same type of window/interaction. It isn't. Neither one will pop up if they (the parent, the app) don't have focus (aka permission ) to pop up -- they simply flash on the taskbar Not correct. That code compiles fine. Oh really?
Really?
How do I post a question effectively? , Basic debugging checklist , How (Not) To Ask A Question | [reply] [d/l] [select] |
by HelenCr (Monk) on Sep 22, 2012 at 06:58 UTC | |
The code piece was just a code snippet, to illustrate the problem. Obviously in the OP it was not intended as a complete program. (See new code example below). To recall the two problems: 1. The "BrowseForFolder()" window does not show up at the foreground, while all other windows do. This is disturbing and annoying, and can lead to many problems. Here is a complete (compileable and running) code example. (5.014 is not essential)
Click the "Commit changes" button, then minimize the main window. Note that the "BrowseForFolder()" window hides behind other windows, and you need to minimize other windows to get to it. All other Perl Win32::GUI windows do open up at the foreground. Furthermore, note that -addexstyle => WS_EX_TOPMOST doesn't have an effect, while it usually does in Perl Win32::GUI windows. Note: change the 'D:\My documents' to an existing directory of yours. 2. How does one find the desktop windows handles? If we could find BrowseForFolder()'s handle, we could raise it to the foreground (how?) Many TIA Helen | [reply] [d/l] |
by Anonymous Monk on Sep 22, 2012 at 08:00 UTC | |
First some notes SSCCE (its like noise ) The code piece was just a code snippet, to illustrate the problem. But you see, it did not illustrate the problem. Even if I went and made it compile, it still did not show the problem. You have to show how it doesn't work , just saying it doesn't work for getting solutions :) Obviously in the OP it was not intended as a complete program. (See new code example below).
Hmm, if it was obvious, why insist the code compiles fine? Here is a complete (compileable and running) code example. Thanks. I see what you're talking about now. You can fix this by removing from $window/Main Window :D That may or may not be what you want, but its a fix ;D 2. How does one find the desktop windows handles? If we could find BrowseForFolder()'s handle, we could raise it to the foreground (how?) If you wonder how it works, UTSL http://cpansearch.perl.org/src/ROBERTMAY/Win32-GUI-1.06/GUI.xs
Would you look at that # -owner => WINDOW Yup, specifying -owner => $Window, does the trick (it works), no WS_EX_TOPMOST required | [reply] [d/l] [select] |
by HelenCr (Monk) on Sep 22, 2012 at 11:52 UTC | |
by Anonymous Monk on Sep 22, 2012 at 23:33 UTC | |