Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsListMBS class.

WindowsListMBS.Focus as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Windows MBS Win Plugin 13.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Retrieves the handle to the window that has the keyboard focus, if the window is attached to the calling thread's message queue.

If the calling thread's message queue does not have an associated window with the keyboard focus, the return value is 0.

WindowsListMBS.ForegroundWindow as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Windows MBS Win Plugin 13.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Retrieves a handle to the foreground window (the window with which the user is currently working).

The system assigns a slightly higher priority to the thread that creates the foreground window than it does to other threads.
The return value is a handle to the foreground window. The foreground window can be 0 in certain circumstances, such as when a window is losing activation.

WindowsListMBS.WindowClassNameFromHandle(Handle as Integer) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Windows MBS Win Plugin 15.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Returns the window class name of the window with the given handle.

For example "SciCalc" for the calc.exe main window.

WindowsListMBS.WindowTextFromHandle(Handle as Integer) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Windows MBS Win Plugin 15.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Returns the title of the window with the given handle.

This may send a message to the thread owning the window and if that one doesn't answer quickly, the call may wait for an answer.
You may want to skip your own process windows to not wait for your own threads.

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...