Click here to Skip to main content
14,448,060 members
Rate this:
Please Sign up or sign in to vote.
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 6-Feb-19 0:06am
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.
Rate this:
Please Sign up or sign in to vote.

Solution 1

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 ...
   
Comments
Maciej Los 6-Feb-19 4:24am
   
5ed!
Rate this:
Please Sign up or sign in to vote.

Solution 2

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[^]
   
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100