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? *******
}
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
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.
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?