Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
21thermostat1
4 discussion posts
I have a program which could open multiple floated windows. I'd like to hide all of windows of this program.
I create custome function, but I cannot figure out a way to get the floated windows' handlers.

IntPtr[] windowHandles = BFS.Window.GetWindowsByText("*WebStorm*");


foreach(IntPtr theHanlder in windowHandles){
// Hide the window
ShowWindow(theHanlder, ShowWindowEnum.SW_HIDE);

// ***** The main window is hiden, but how can I hide the floated window also? *******

}
Jan 21, 2019  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
You might need to use the BFS.Window.GetChildWindowByClass function. You can use Window Inspector to find out the window class for those windows.

Hope that helps!
Jan 22, 2019  • #2
User Image
21thermostat1
4 discussion posts
The program is WebStorm, a JavaScript IDE. https://www.jetbrains.com/webstorm/

But the BFS.Window.GetChildWindowByClass() does not return any window handler.
Please see my funciton below:

IntPtr[] windowHandles = BFS.Window.GetWindowsByText("*WebStorm*");
IntPtr childWinHandle;




foreach(IntPtr theHanlder in windowHandles){
// *********** not work!!
childWinHandle = BFS.Window.GetChildWindowByClass(theHanlder, "SunAwtFrame");
ShowWindow(childWinHandle, ShowWindowEnum.SW_HIDE);

// This line works, the main windows are hidden.
ShowWindow(theHanlder, ShowWindowEnum.SW_HIDE);



}
• Attachment: 1.jpg [395,129 bytes]
1.jpg
1.jpg
Jan 22, 2019  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, turns out I was wrong on the ChildWindows function. There may be a way to do this, I will check in with our developers to see if they can do an example script that would get those types of windows.
Jan 25, 2019  • #4
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I've checked in with our developers, and they said that those windows should be top-level windows with this class: BFS.Window.GetWindowByClass("SunAwtFrame")

Could you try that to get those windows?
Jan 31, 2019  • #5
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)