Results 1 to 2 of 2

Thread: How to find all the windows are running on computer

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    1
    that include
    1. exe name
    2. title bar
    3. handle
    and description

  2. #2
    Guest
    Here is how to get all the window handles:

    Code:
    Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
    Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpstring As String, ByVal cch As Long) As Long
    
    Function GetCaption(hwnd)
    hwndLength% = GetWindowTextLength(hwnd)
    hwndTitle$ = String$(hwndLength%, 0)
    a% = GetWindowText(hwnd, hwndTitle$, (hwndLength% + 1))
    GetCaption = hwndTitle$
    End Function
    
    Private Sub Command1_Click()
    For i = 1 To 10000
    X = GetCaption(i)
    List1.AddItem X
    Next i
    End Sub
    Here is how to get a list of running files: App List and Kill

    Here is the link to an Api Spy.

    Or make your own: Windows Spy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width