VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Very simple way to save your program settings

by RyanConard (8 Submissions)
Category: Coding Standards
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (6 Votes)

This is very, very simple.. This is the easiest way to save a save a setting, besides using Print to text file.. it can be useful to save from and load to text boxes, dropdowns, listboxes, what have you.. because of its simplicity i dont expect votes.. its just a small piece of code.. but vote if you want to... thanks, enjoy!

Rate Very simple way to save your program settings

'This code is very, very simple..
'I dont care if you vote on it or not..
'just enjoy it..
Private Sub cmdGet_Click()
'This calls upon everything in cmdSave
'Then puts the text in txtSave
txtSave.Text = GetSetting(App.ProductName, "Settings", "txtSave", txtSave.Text)
End Sub
Private Sub cmdSave_Click()
'This saves the following:
'1. Product Name [Located under Project > ..Properties > Make]
'2. It writes a category called "Settings"
'3. It writes a sub category called "txtSave"
'4. Under sub category "txtSave" it writes whatever text is in txtSave
SaveSetting App.ProductName, "Settings", "txtSave", txtSave.Text
End Sub
Private Sub txtSave_Change()
'No code goes here
'Just make a txtSave
End Sub

Download this snippet    Add to My Saved Code

Very simple way to save your program settings Comments

No comments have been posted about Very simple way to save your program settings. Why not be the first to post a comment about Very simple way to save your program settings.

Post your comment

Subject:
Message:
0/1000 characters