简体   繁体   中英

TextBox save value/input automatically

I would like to save a few values from text boxes that should be loaded into the text boxes every time I restart my program.

However, since my customers all use different values and should not re-enter them with every restart, I thought I could save these values somehow. But I have no idea how to do that.

my program is also tied to a database if there is a clean way, I would choose that too. my customers all have an account to log in to. but it can also be a simple.txt or XML file, but how does that work?

I working with visual Studio C# WinForms.

Windows Forms comes with Settings , which allow you to save variable values and load them back up the next time your program is run. The Designer allows you to create settings and set the data types for them. See the Microsoft documentation in the link above for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM