Home All Groups Group Topic Archive Search About

Name of Active User Control Docked in Panel

Author
20 Apr 2006 10:00 AM
Mike TI
April 20, 2006

Hi All

Is there a way I can tell the name of the user control docked in a Split
Container Panel. I am using VB.Net 2005.

e.g. if I dock a user control using the code below:

UserControl1.Parent=Form1.SplitContainer1.Panel2
UserControl1.Dock=DockStyle.Fill
UserControl1.Show()

Is there a way I can find out the name of the user control docked in Split
Container Panel2.
(something that returns "UserControl1")

Thanks
Mike TI

Author
20 Apr 2006 10:58 AM
Herfried K. Wagner [MVP]
"Mike TI" <sunset***@hotmail.com> schrieb:
> Is there a way I can tell the name of the user control docked in a Split
> Container Panel. I am using VB.Net 2005.
>
> e.g. if I dock a user control using the code below:
>
> UserControl1.Parent=Form1.SplitContainer1.Panel2
> UserControl1.Dock=DockStyle.Fill
> UserControl1.Show()
>
> Is there a way I can find out the name of the user control docked in Split
> Container Panel2.
> (something that returns "UserControl1")

'MsgBox(Me.SplitContainer1.Panel1.Controls(0).Name)'.

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