积极答复者
请问,如何在vb10中嵌套窗口,不是简单的继承,是有点像虚拟桌面

问题
答案
-
Public Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As IntPtr
Dim _Process As System.Diagnostics.Process = System.Diagnostics.Process.Start("C:\WINDOWS\notepad.exe") While (Not _Process.WaitForInputIdle()) Application.DoEvents() End While SetParent(_Process.MainWindowHandle, Me.Handle)
http://feiyun0112.cnblogs.com/
全部回复
-
Public Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As IntPtr
Dim _Process As System.Diagnostics.Process = System.Diagnostics.Process.Start("C:\WINDOWS\notepad.exe") While (Not _Process.WaitForInputIdle()) Application.DoEvents() End While SetParent(_Process.MainWindowHandle, Me.Handle)
http://feiyun0112.cnblogs.com/ -
对了,请您说明一下是在什么对象中使用,是label?还有我在visual studio 2010中复制到一个新建窗口中,提示
中错误 1 关键字作为标识符无效。 C:\Users\Randy\AppData\Local\Temporary Projects\test\Form1.vb 4 16 testPublic Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Public Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As IntPtr Dim _Process As System.Diagnostics.Process = System.Diagnostics.Process.Start("C:\WINDOWS\notepad.exe") While (Not _Process.WaitForInputIdle()) Application.DoEvents() End While SetParent(_Process.MainWindowHandle, Me.Handle) End Sub End Class
错误 2 未声明“SetParent”。它可能因其保护级别而不可访问。 C:\Users\Randy\AppData\Local\Temporary Projects\test\Form1.vb 12 9 test
支持GNU运动,支持开源软件。 Microsoft的平台只适合游戏与3D绘图。 不过Mircosoft的IDE真的好用。 要是wine够强就好了。