-
I want to be able to return all of the windows that have a visible GUI (basically all of the windows shown in the task bar would be sufficient.) I have tried the EnumWindows API but it returns WAY more than just the visible windows. Does anyone know of a way of doing this?
Thanks in advance. :)
-
Use the IsWindowVisible API:
Code:
Public Declare Function IsWindowVisible Lib "user32" Alias "IsWindowVisible" (ByVal hwnd As Long) As Long
Whenever you want to use it, use:
Code:
ReturnVal=IsWindowVisible(hwnd)
if ReturnVal=0 Then Exit Sub 'If not visible then exit the sub.