I’m trying to make an application where the users can click on the buttons to navigate through different forms. I.E: If I click on network status, it replaces the Main Form with a network status form, and then you can go back to the main form by clicking on “return”.
What would be the best approach to do this? I’m thinking panels but people told me to use usercontrol and I’m not quite familiar with it. I’d appreciate any guidance.
Hi,
Assuming your requirement as depicted in the
storyboard. Have aUserControl of these many controlswhich areDOCKEDas per the picture on the UserControl. Now in the blank area you will have toshow / hideyourpage / form / screen.I would suggest this piece of code can do the trick for you to display / hide form dynamically on navigation. Have this in your navigation bit i.e. Next / Prev click on the
Usercontrol–On Next and Prev clicks , you just do
Controls.RemoveByKey(...)to hide the existing form & the above code willaddthe next respective form after you have instantiated the same. This is a pretty cool function to remove control[s] from a collection if you have definedunique namesfor all yourforms / screen / page[whatever you say].