Results 1 to 5 of 5

Thread: Saving Forms Dynamically

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    43

    Red face 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....

  2. #2
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536
    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.
    This world is not my home. I'm just passing through.

  3. #3
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Serialize it

  4. #4

    Thread Starter
    Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    43
    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

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    43
    Please anyone can help me with this problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width