VB 如何获取窗体里面按钮的类名。求高手
--------------------编程问答--------------------
Option Explicit
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Sub Command1_Click()
Dim lngP As Long
Dim strClassName As String * 256
Dim strP As String
lngP = GetClassName(Command1.hwnd, strClassName, 255&)
strP = Trim(strClassName)
Me.Caption = strP
End Sub
--------------------编程问答--------------------
EnumChildWindows
补充:VB , API