Retaining dynamically added labels even when application isrestarted.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ketaki

    Retaining dynamically added labels even when application isrestarted.

    Hello,
    I am facing a problem. I have a application in C# (winforms) where
    I am giving an option to the user to add labels during runtime. But
    when the application is restarted the labels that are added
    during runtime get deleted. As the user is adding a label I do not
    know the location of label. I want the labels added to appear in the
    same location even when the application is restarted.
    Please help.
    Thanks
  • cfps.Christian

    #2
    Re: Retaining dynamically added labels even when application isrestarted.

    I did something similar only with buttons. What I did was created an
    object that told me the information I needed to know and serialized it
    onto the user's hard drive. If you're working on a more enterprise
    application you could do the same into a database. Once you've saved
    it then just on the form load (in my case Log In) just grab the file
    with the correct name (I based mine on user ID) and deserialize it
    using the information to replace all the information.

    Comment

    Working...