Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private Declare Function GetDesktopWindow Lib "user32" () As Long '正常显示 Private Sub Command1_Click()
End Sub '全屏显示 Private Sub Command2_Click() SetParent Form1.hWnd, GetDesktopWindow Form1.WindowState = 2 Form1.Show
End Sub
Option ExplicitPrivate Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private Declare Function GetDesktopWindow Lib "user32" () As Long '正常显示 Private Sub Command1_Click()
Private Declare Function GetDesktopWindow Lib "user32" () As Long
'正常显示
Private Sub Command1_Click()
SetParent Form1.hWnd, MDIForm1.hWnd
Form1.WindowState = 2
Form1.Show
End Sub
'全屏显示
Private Sub Command2_Click()
SetParent Form1.hWnd, GetDesktopWindow
Form1.WindowState = 2
Form1.Show
End Sub
Private Declare Function GetDesktopWindow Lib "user32" () As Long
'正常显示
Private Sub Command1_Click()
SetParent Form1.hWnd, MDIForm1.hWnd
Form1.WindowState = 0 '这里应该是0
Form1.Show
End Sub
'全屏显示
Private Sub Command2_Click()
SetParent Form1.hWnd, GetDesktopWindow
Form1.WindowState = 2
Form1.Show
End Sub