问题如标题

解决方案 »

  1.   

    Dim s As Control
        For Each s In Form1.Controls
            MsgBox s.Name
        Next
      

  2.   

    完全可以,主要使用的函数为:EnumChildWindows
    EnumThreadWindows
    EnumWindows
      

  3.   

    hParent = FindWindow(vbNullString,"要查找的窗口标题")
        hChild = GetWindow(hParent, GW_CHILD)
        Do
        
            strClassName = Space(255)
            GetClassName hChild, strClassName, 255        MsgBox strClassName
            
            hChild = GetWindow(hChild, GW_HWNDNEXT)
            DoEvents
            
        Loop Until hChild = 0
      

  4.   

    可 以 用 这 样 的 方 法 : 
         For Each Obj In Form(指 定 的 窗 体 名 ) 
         If Obj Is ListBox Then 
         ...... 
         End If 
         Next