Results 1 to 3 of 3

Thread: Getting ClassName of a program

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2002
    Posts
    107

    Getting ClassName of a program

    There is probably an easy answer to this, but how would I go about finding the classname of a program?

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Of a program, or a window? Here's for a window...
    VB Code:
    1. Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, _
    2.                                                                           ByVal lpClassName As String, _
    3.                                                                           ByVal nMaxCount As Long) _
    4.                                                                           As Long
    5.  
    6. Private Sub Command1_Click()
    7. Dim s As String
    8.  
    9.     s = Space$(255)
    10.     Call GetClassName(hwnd, s, Len(s))
    11.  
    12.     MsgBox s
    13.    
    14. End Sub
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2002
    Posts
    107
    Thank you for the suggestion, but i figured out i can just use spy++

    Justin

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