I also made a Windows forms application in Visual Studio 2019. I've added language options to the app. I choose a language, it is not a problem, but when I close and open the application, the settings are reset. Is there a solution to this?enter image description here
Asked
Active
Viewed 24 times
0
-
The choice needs to be saved (somehow - there are various options for that). Then when the app starts you need to retrieve and apply the saved setting value. What you are doing here is just setting the value "at runtime" - but it only exists for the life of the running application. It is not a permanent part of your application. – topsail Oct 12 '22 at 17:48
-
How can I do this? Can you tell me? – Alper Akca Oct 12 '22 at 18:00
-
@AlperAkca One option is the registry: Store your option in there when the user changes it, and read it when your application starts. You could also use a config file on disk (this is just normal file reading/writing, and usually in someplace like %APPDATA%. – Steve Oct 12 '22 at 18:16
-
@Steve Can you tell me how to do it with registry? – Alper Akca Oct 13 '22 at 15:25
-
@AlperAkca Start with the documentation: https://learn.microsoft.com/en-us/dotnet/api/microsoft.win32.registry?view=net-6.0 – Steve Oct 14 '22 at 15:26