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.
> Hello,
> I am facing a problem. I have a application in C# (winforms) where
[quoted text clipped - 3 lines]
> know the location of label. I want the labels added to appear in the
> same location even when the application is restarted.
If you have no way to enumerate the labels that were added (and thus find
out their location), then you won't be able to do this. So the first step
is to fix your design if necessary so that you can enumerate the added
labels.
Once you've done that, it's a simple matter to save the important
information (pretty much whatever the user has control over, which might
include text, position, font, color, whatever...you're pretty vague about
what's going on so I can't offer specifics). The question is "where to
save it?" You can write to a file or database as "cfps.Christian"
suggests, but I'd say that in the most basic scenarios, you should just
using the built-in Settings class and let .NET handle how to actually
manage the data persistence.
Pete