Adding data to the registry in Visual Basic
Thursday, December 30th, 2004 | Programming, Tech
This sample shows a bottom which when clicked changes the registry. The first three bits of information are the categorises in the registry while the final one is the value.
Private Sub button1_Click()
SaveSetting "My App", "Options", "Clicked", "Yes"
End Sub
You can also make the information dynamic. For instance if you wanted to save a users name you could have a text box called Name1. When the clicked a button it would then save the name they entered into the registry.
Private Sub button1_Click()
SaveSetting "My App", "Users", "Username", Name1.Text
End Sub
This sample shows a bottom which when clicked changes the registry. The first three bits of information are the categorises in the registry while the final one is the value.
Private Sub button1_Click() SaveSetting "My App", "Options", "Clicked", "Yes" End Sub
You can also make the information dynamic. For instance if you wanted to save a users name you could have a text box called Name1. When the clicked a button it would then save the name they entered into the registry.
Private Sub button1_Click() SaveSetting "My App", "Users", "Username", Name1.Text End Sub