Very simple way to save your program settings!
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
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!
Original Author: RyanConard
Code
'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
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.