471,348 Members | 1,543 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to Overlap User Controls in Windows Application?

I know the answer is simple ... as soon as I find it.

I have a Windows Application in which I want to display a different
User Control in the bottom part of the form depending on the
functionality chosen by the user.

I have made several User Controls and they now show up in my toolbox.

How do I put them all on the bottom part of the form (including
docking) and make only one visible when needed?

Thanks.
Jun 27 '08 #1
2 5778
I usually use a Panel for this. You can easily hide/show an entire panel.
The trick is dealing with these panels in the Designer.
--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"sa**********@gmail.com" wrote:
I know the answer is simple ... as soon as I find it.

I have a Windows Application in which I want to display a different
User Control in the bottom part of the form depending on the
functionality chosen by the user.

I have made several User Controls and they now show up in my toolbox.

How do I put them all on the bottom part of the form (including
docking) and make only one visible when needed?

Thanks.
Jun 27 '08 #2
On Wed, 30 Apr 2008 07:32:32 -0700, <sa**********@gmail.comwrote:
I know the answer is simple ... as soon as I find it.

I have a Windows Application in which I want to display a different
User Control in the bottom part of the form depending on the
functionality chosen by the user.

I have made several User Controls and they now show up in my toolbox.

How do I put them all on the bottom part of the form (including
docking) and make only one visible when needed?
Just drag them all into your form. You can initialize them all with the
Visible property as "false". Or if you have one that you want to be
visible by default, leave that one's Visible property as "true".

You can use the Tab key in Visual Studio to change the currently selected
control, once one control is selected. This is very useful when you have
multiple overlapping controls that make it impossible to actually click on
one or more that's under another control.

You could do the same thing putting them into a Panel I suppose, as Peter
R. suggests. But I'm not sure why you'd bother, since a UserControl is
pretty similar to a Panel anyway. You can show and hide individual
UserControls just as easily as a Panel that contains a UserControl.

Pete
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by dag | last post: by
reply views Thread by JIM.H. | last post: by
4 posts views Thread by DotNetJunkies User | last post: by
5 posts views Thread by Segfahlt | last post: by
2 posts views Thread by Dan Aldean | last post: by
1 post views Thread by npaulus | last post: by
3 posts views Thread by Terry Olsen | last post: by

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.