Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As LongPrivate Sub MDIForm_Load() Dim frmT As New Form1
SetParent frmT.hWnd, Me.Picture1.hWnd frmT.Width = 4000 frmT.Height = 3000 frmT.Show End Sub
你如果要在mdi窗体上放图片,利用它的picture属性就可以了,当你放了picturebox的时候,当然是会造成你现在的这种情况了
Dim frmT As New Form1
SetParent frmT.hWnd, Me.Picture1.hWnd
frmT.Width = 4000
frmT.Height = 3000
frmT.Show
End Sub
可以用SetParent函数把子窗体的父设成Picture,但要记得在窗体关闭时改回来