-
Saving Forms Dynamically
Hi mates
hope you had good lunch today,
i've got a question
saying i am desiging a form by adding new controls while running the program such as buttons, labels, then changing the properties of these controls....
but when i exit vb .net, and come back to the program i loose all the data, and have to run the program again.....
Is there a way so i can save the program as it is with all the new buttons, and new changed properties, without having to run the program again and entering all information....
thanks for your help in advance....
Have a nice day....
-
All the information you want is in the form's Controls array. You could write some code to access each element in Me.Controls and write the data out to a file.
Once you have the file you can paste it into your code in the Windows Generated section.
The problem you will have is getting out the information you want and fromatting it correctly. Should be fun to do, but probably not worth it unless you have thousands of controls or need to do this several times.
-
-
I already did that, write a code to display buttons and labels then change their properties,,,coz i am trying to give the user the chance to build a hierarchy from scratch... where he cna add as many buttons and labels and update their properties....
but when saving the program and exit vb .net and trying to run the program i have to redesign the whole hierarchy since all data has been lost....
thanks for helping
-
Please anyone can help me with this problem