473,396 Members | 1,975 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,396 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 20343
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.