|laziness, impatience, and hubris|
Re^4: Win32::GUI: how to find BrowseForFolder()'s handle?by HelenCr (Monk)
|on Sep 22, 2012 at 06:58 UTC||Need Help??|
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?)