Click here to Skip to main content
15,894,896 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I want to create an application in vb.net that will have buttons on top and when you click a button the panel for that button appears with all of the controls for that panel.

I have a screen shot of the form but don't know how to attach it.

What I have tried:

I have only created the layout of the form.
Posted
Updated 5-Feb-19 23:06pm
Comments
Dave Kreskowiak 29-Jan-19 22:27pm    
...and? Permission granted?

You haven't said anything at all about what any problem you're having so it's pretty much impossible to tell you anything useful.

You don't need to work with Button's and different Panels - there is an existing Control which works like this :
Try to use the TabControl on your Form ...
 
Share this answer
 
Comments
Maciej Los 6-Feb-19 4:24am    
5ed!
On the fisrt look at your question i was thinking about using the same component as suggested in solution #1 by Ralf Meier[^]. But... on the second, i think you have to implement your logic in Model-View-Presenter[^] pattern.

What this mean to you? In a short:
View => The View is a user control that inherits from System.Windows.Forms,
Presenter => The Presenter marries the View to the Model,
Model => The Model is a representation of the data being manipulated.

For further details, please see:
WinForms Model View Presenter[^]
Introducing MVP (Model-View-Presenter) Pattern (WinForms) - C# Tutorials | Dream.In.Code[^]
 
Share this answer
 
Comments
Ralf Meier 6-Feb-19 7:09am    
Thanks for your vote Maciej.
I suppose that the Enquirer doesn't works on that level ... but I don't know ... :(

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