This example displays a dialog box containing the class name of Program Manager's Main window. It does so using the .Value property, passing it directly to a Windows external routine.
Declare Sub GetClassName Lib "user" (ByVal Win%,ByVal ClsName$,
????????ByVal ClsNameLen%)
Sub Main()
????Dim ProgramManager As HWND
????Set ProgramManager = WinFind("Program Manager")
????ClassName$ = Space(40)
????GetClassName ProgramManager.Value,ClassName$,Len(ClassName$)
????MsgBox "The program classname is: " & ClassName$
End Sub
|