XP 和 WIN7 不能通用
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPrivate Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Command1_Click()
Dim i&
i = FindWindow("wndclass_desked_gsk", vbNullString)
SetParent Me.hWnd, i
End Sub
Private Sub Command2_Click()
SetParent Me.hWnd, 0
End Sub
这段代码XP里可以移动窗体,win7里不行,请问高手是什么原因