用api看可不可以实现 Private Declare Function SetParent Lib "user32" (ByVal HwndChild As Long, ByVal HWndNewParent As Long) As Long
Option Explicit Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private OldContainer As Long Private Sub Command1_Click() OldContainer = SetParent(Me.hWnd, 0) End SubPrivate Sub Command2_Click() Call SetParent(Me.hWnd, OldContainer) Me.Move 0, 0 End SubPrivate Sub Form_Load() Command1.Caption = "移出" Command2.Caption = "移入" End SubPrivate Sub MDIForm_Load() Form1.Show End Sub
金蝶的K3就是掉DLL的
也是这样的
他实现的了啊
Private Declare Function SetParent Lib "user32" (ByVal HwndChild As Long, ByVal HWndNewParent As Long) As Long
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private OldContainer As Long
Private Sub Command1_Click()
OldContainer = SetParent(Me.hWnd, 0)
End SubPrivate Sub Command2_Click()
Call SetParent(Me.hWnd, OldContainer)
Me.Move 0, 0
End SubPrivate Sub Form_Load()
Command1.Caption = "移出"
Command2.Caption = "移入"
End SubPrivate Sub MDIForm_Load()
Form1.Show
End Sub