模式窗体是肯定要用的,但还要建立父子关系阿。我把我写的程序拿给大家看:
父窗体:
Option Explicit
Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetParent Lib "User32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Declare Function SetForegroundWindow Lib "User32" (ByVal hWnd As Long) As Long
Private Sub Command1_Click()
Dim handleP As Long ' parent window handle
Dim handleS As Long ' son window hanle
Dim handleT As Long
Dim temp As Long
Dim obj As Object