G Guest Apr 24, 2006 #1 Hello people, i need a favor from you, i need display a windows form into a panel. How i do it?
K Ken Tucker [MVP] Apr 24, 2006 #2 Hi, Declare Auto Function SetParent Lib "user32" (ByVal hWndChild As IntPtr, ByVal nWndPArent As IntPtr) As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim frm As New Form2 SetParent(frm.Handle, Me.SplitContainer1.Panel2.Handle) frm.Show() End Sub Ken
Hi, Declare Auto Function SetParent Lib "user32" (ByVal hWndChild As IntPtr, ByVal nWndPArent As IntPtr) As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim frm As New Form2 SetParent(frm.Handle, Me.SplitContainer1.Panel2.Handle) frm.Show() End Sub Ken
C Chris Dunaway Apr 24, 2006 #3 You can do it withough interop too: Dim frm As New Form2 frm.TopLevel = False frm.Parent = Me.SplitContainer1.Panel2 frm.Show
You can do it withough interop too: Dim frm As New Form2 frm.TopLevel = False frm.Parent = Me.SplitContainer1.Panel2 frm.Show
H Herfried K. Wagner [MVP] Apr 24, 2006 #4 Andres Rojas said: Hello people, i need a favor from you, i need display a windows form into a panel. How i do it? Click to expand... Maybe it's better to use user controls ("Project" -> "Add user control...") instead of forms. Otherwise I'd stick with the 'TopLevel = False' tip.
Andres Rojas said: Hello people, i need a favor from you, i need display a windows form into a panel. How i do it? Click to expand... Maybe it's better to use user controls ("Project" -> "Add user control...") instead of forms. Otherwise I'd stick with the 'TopLevel = False' tip.