Compare Window Handles

Posted On 2017-06-22 by BlackBeltVB
Keywords:
Tags: VB6 Miscellaneous 
Views: 126

Title Uploaded Size
COMPHWND.ZIP 6/22/2017 12:20:53 PM 2,844


How to enumerate all window handles. Fills one ListBox with all window handles, titles, and classes. Fills another with any windows not found in the original. Useful for searching out all the windows used by a specific application. Just fill the base, run your program, then find the new ones. 

Special Instructions

Uses the following API function and messages:

  • EnumWindows
  • EnumChildWindows
  • GetClassName
  • GetWindowLong
  • GetWindowText
  • SendMessage
    • LB_FINDSTRING
    • WM_GETTEXT
    • WM_CLOSE

Requirements

This code originally appeared on BlackBeltVB.com, and has been republished here with the permission of Matt Hart.


About the Author

has posted a total of 89 articles.


Comments On This Post

No comments on this post yet!


Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.


Your IP address is:54.166.212.152

Before you can post, you need to prove you are human. If you log in, this test goes away.


Code Links