When I first started to learn how to program Windows applications I was mystified by the Windows Registry. I discovered that programs would store information there and most "normal" users would never even know about it. This was the perfect place to store encrypted passwords and things like that. Of course now days the registry is becoming less and less helpful because it has grown enormously and is a pain to move when a computer is upgraded. Still storing a value in the registry, especially program settings or things such as that, can be very helpful. This code snippet shows you how to use Visual Basic's built in SaveSetting and GetSetting commands to store and retrieve data in the registry.
To use this code create a new Visual Basic project, add two command buttons to it, add two text boxes. Go to the code area and add the following source code.
After you have added the source, run your program and you should be able to save and retrieve data from the registry.
Note: The source for this was found at DreamVB which is no longer online.