Name of Active User Control Docked in Panel

M

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
 
H

Herfried K. Wagner [MVP]

Mike TI said:
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)'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top