Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_CLIPSIBLINGS = &H4000000
Private Const WS_VISIBLE = &H10000000
Dim handle As Long, Ret As Long
'获取窗体句柄
handle = Form2.hwnd
Ret = SetWindowLong(handle, GWL_STYLE, WS_VISIBLE Or WS_CLIPSIBLINGS)
'插入指定的窗体
SetParent handle, Picture1.hwnd
Form2.Move Picture1.ScaleLeft, Picture1.ScaleTop
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
8886




被折叠的 条评论
为什么被折叠?



