Adding data to the registry in Visual Basic

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
Timeline

Newsletter

Don't have time to check my blog? Get a weekly email with all the new posts. This is my personal blog, so obviously it is 100% spam free.

Metadata

Tags: , , , ,

This entry was posted on Thursday, December 30th, 2004 at 4:07 pm and is filed under Programming, Tech. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.