GetWindowClass – The class name of a window

Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal _    hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long' Return the class name of the specified window' Example: MsgBox GetWindowClass(Me.hWnd)Function GetWindowClass(ByVal hwnd As Long) As String    Dim sClass As String    sClass = Space$(256)    GetClassName hwnd, sClass, 255    GetWindowClass = Left$(sClass, InStr(sClass, vbNullChar) - 1)End Function

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: