Click here to Skip to main content
15,896,382 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys i am a very good web developer but now i want to try the windows form but i have one question how can i create multiple panels in the same window example my program is: menu with multiple buttons once i click any button i have to close the opened one and open the clicked one in the same window no need to open a new window

regards
Posted

Create multiple panels in one window and change its visibility property,on close of 1st panel, sets 2nd panel visibility to true.
 
Share this answer
 
Comments
youssef_123 11-May-12 2:32am    
yes man i know that but is it like web i mean can i create them next each other and show or hide i think does that took a space in the window or i use them like the web
Maciej Los 11-May-12 2:41am    
Please, don't do it. Why? Read my answer.
I think, the question is abut general progamming concept... So...

You can use a TabControl to achive that, where each TabPage contains different controls. Some TabPages are hidden (for example in the other not visible TabControl) until user click menu, BUT this is a childlike concept!.

Better way to achive that is to create form dynamicly.
http://support.microsoft.com/kb/319266[^]
http://en.csharp-online.net/Add_Controls_at_Run_Time[^]
Crafting a C# Forms Editor from scratch[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900