Get hWnd of All Visible Windows on Screen.

Category:
Forms and Controls
Type:
Snippets
Difficulty:
Intermediate
Author:
Anonymous

Version Compatibility: Visual Basic 6

More information:
The code included here can be used to get the visible window's hWnd (window handle) and keep it in an array. You can't use a process ID with many API functions, so this is one place where this code comes in handy.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: