lets say I have a form (form1) with lables a-z which are all designed with default text "0". So they all show 0 on program startup. which is fine.

I also have a dialog with 2 TextBoxes; I want my program to update the default text/value on (only)form1 labels x, y and z to whatever was put into the textboxes when i press the OK button on the Dialog, so these specified labels show the 'new' value on next startup.

What is the best thing i can do? Is it even possible or should I save the values to a file
which loads the values in the specified labels on startup?

I have no code to show for so far because i am still designing.

TY for any help

What about using database for the purpose.

If only few values, We can save in Application setting files?

commented: I agree +6

It's really only about changing 3 labels . Thats 3 values. If there is no other way i will consider database.

Here is what i want to happen; on buttonclick , value put in textbox1 to label1, value put in textbox2 ro label2 and cuurentdate to label3. Most important is i want the app to save those values .

Ty all so far

If it is one value or more always better to store securely , preferable in DB.

For just 3 values, with no history or change log requirement, I'd go with application settings as Pgmer suggested.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.