我觉得是不可行的
不要使用MDI子窗体然后用findwindows  API函数

解决方案 »

  1.   

    Public Function have_form(mdifm As MDIForm) As Boolean
      Dim actfm As Form
      Set actfm = mdifm.ActiveForm
      If actfm Is Nothing Then
         have_form = False
         child_reg = False
      Else
         have_form = True
      End If
    End Function
      

  2.   

    If App.PrevInstance = True Then
            MsgBox "有程序运行"
    End If
      

  3.   

    用Forms这个内置全局对象集合.
    dim f 
    for each f in forms
       if f.namd ="你要找的窗体" then
           msgbox "给分吧!"
       end if
    next