473,383 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

show form into splitcontainer.panel

Hello people, i need a favor from you, i need display a windows form into a
panel. How i do it?
Apr 23 '06 #1
4 20340
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

-------------------

"Andres Rojas" <Andres Ro***@discussions.microsoft.com> wrote in message
news:EE**********************************@microsof t.com...
Hello people, i need a favor from you, i need display a windows form into
a
panel. How i do it?

Apr 24 '06 #2
You can do it withough interop too:

Dim frm As New Form2

frm.TopLevel = False
frm.Parent = Me.SplitContainer1.Panel2
frm.Show

Apr 24 '06 #3
"Andres Rojas" <Andres Ro***@discussions.microsoft.com> schrieb:
Hello people, i need a favor from you, i need display a windows form into
a
panel. How i do it?


Maybe it's better to use user controls ("Project" -> "Add user control...")
instead of forms. Otherwise I'd stick with the 'TopLevel = False' tip.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Apr 24 '06 #4
Thank for you collaboration...

"Chris Dunaway" wrote:
You can do it withough interop too:

Dim frm As New Form2

frm.TopLevel = False
frm.Parent = Me.SplitContainer1.Panel2
frm.Show

Apr 24 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: J.S. | last post by:
I have a TreeView control in the left panel of a SplitContainer. When I click on various nodes in the TreeView I would like different sets of buttons and textboxes to appear in the right panel. ...
0
by: Alex Bibiano | last post by:
I have a splitcontainer with a tabcontrol in the second panel. The tabcontrol has his dock property set to fill. In runtime mode, if I move the splitcontrol, the tabcontrol isn't resized. Is...
0
by: Sq | last post by:
I am having trouble with flickering of anything drawn on the splitContainer panels during resizing. I have overriden the control and used all the SetStyle settings for double buffering and this did...
4
by: Mikus Sleiners | last post by:
I can't seem to add new controls to form that is inherited from another form. I have BaseForm wich have table layout on it 2 panelsm and some buttons. Now i create InheritedForm : BaseForm and...
12
by: Adil Akram | last post by:
I'm using VS 2005, .net 2.0 for a desktop application (Window Form app). I can't set ZOrder of Panel control neither at design time by toolbar/menu command "Bring to Front"/"Sent to Back" nor at...
1
by: Martin | last post by:
Hi all! I made a UserControl with a SplitContainer in it. I put some controls in the SplitContainer.Panel1. After that, I created a new UserControl which inherit from the previously created...
0
by: Jaime Lucci | last post by:
Hi everyone! I have a problem that I can't resolve. In VB2005 I've programmed a new class, where I use a Windows Form with four controls: a SplitContainer, a Panel, a Label and a...
1
by: Jeff Williams | last post by:
I have a form which contains a split panel In Panel 2 I have an OK and Cancel button at the bottom of the Panel. I add a form to the top of the panel so I now have a form with a fixed Ok and...
4
by: BrianP | last post by:
I have a form that is currently being displayed in a split container with panel 1 holding a treeview and panel2 holding the form. my code for this is here. This is when selecting a item from the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.