Click here to Skip to main content
15,568,965 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
After adding controls to a form, I need to save the form, so next time I open the project the saved form includes all added controls from the previous run.

What I have tried:

I couldn't find anything related.
Posted
Updated 19-Jan-21 17:21pm

To do that, you need to save the controls you added, what type they are, the place you added them, and all the other info you set when you added them; and store that info in a file - the read it back at startup and add them again.

We can't do that for you: we have no idea what you code is doing, how it does it, or when it does it. So start by picking a sensible file format (XML, or JSON maybe) and store the data in a sensible place: Where Should I Store My Data?[^] - to code is in C#, but it's pretty obvious stuff.
 
Share this answer
 
Would suggest you to look at the following CodeProject articles and try out your version or changes you need:
Windows Form Design at Run Time[^]
VB.NET runtime control designer for windows forms[^]
 
Share this answer
 

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