Is there any way I can save changes made by a user , so that at the next run they would still be there? I have seen something about My.Settings , is that how it is done?
Yes you have multiple options, you can create a file and load it on startup, or you can use the built in settings object. Just go to your Project Property's
--> settings
set your variable there, the you can access it through My.Settings
Then load it like this:
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Dim greeting As String = My.Settings.mySetting
End Sub
you would change the value and save it like this
My.Settings.mySetting = "GoodBye"
My.Settings.Save()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With