Blue Theme Orange Theme Green Theme Red Theme
 
DevExpress Free UI Controls
Home | Forums | Videos | Photos | Blogs | Beginners | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
Search :       Advanced Search »
Home » Blogs Home » Blog Detail

Loading form into splitcontainer

 by Roy Heaney on Aug 27, 2010

Loading form into splitcontainer
Comments: 0 Views: 2203 Printable Version 

Hi guys searched and could not find anything, so Iam adding these two how to's 
You can do it with interop:
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

You can do it without interop too:
Dim frm As New Form2
frm.TopLevel = False
frm.Parent = Me.SplitContainer1.Panel2
frm.Show
Enjoy

I Code there for I Am!
Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
 
What do you say about this post? Post a comment here
*Title:
*Comment:
 
Comments not available.
Mindcracker MVP Summit 2012
Become a Sponsor

 Blogger's Profile
Age: Not Available
Location:
Title: Developer
Joined: Aug 24, 2010
Education: Diploma
 More Blogs from this Blogger
Loading form into splitcontainer
View all »
 Latest Blogs
Read Number from a String
Populate combobox from excel
Edit, update and cancel the records in the datagrid.
Sort data in datagrid
Streaming in WCF
A guided tour of uploading a File using WCF Services
Types of Polymorphism in vb.net
ComboBox Control in Ajax
Working with ComboBox
One-way Operations in WCF
View all »
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 
Team Foundation Server Hosting
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.