The WindowEx.GetActiveWindow function retrieves the window handle to the active window associated with the thread that calls the function.
number WindowEx.GetActiveWindow();
Parameters
This function has no parameters.
Return Values
If the function succeeds, the return value is the handle to the active window associated with the thread that calls the function. If the calling thread does not have an active window, the return value is 0.