用API
Public Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Public Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Public Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
SET Form2 =New Form1
我采用了你的方法,但是程序运行的时候 出现了runtime error 对话框.整个vb就退出了.使用这个函数是不是还有其他的注意事项.望指点
感谢你的提醒.出现的异常使我程序的问题.
Load form2
form2.Show