回复 studentxuefei :
setparent的返回值就是原来的父句柄..
进过测试,可以
Option Explicit
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Dim mlong As Long
Private Sub Form_Click()
Debug.Print SetParent(2164602, mlong)
End Sub
Private Sub Form_Load()
mlong = SetParent(2164602, Me.hWnd)
Debug.Print mlong
End Sub