VB Code:
Dim regKey As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software", True)
'/// this gets the registrykey " HKEY_CURRENT_USER\Software\ "
'///
If regKey.OpenSubKey(Application.ProductName, True) Is Nothing Then '///....
'/// the code within the If statement checks if the registry key for your application exists or not , starting with the above line ^^^
'///
regKey.CreateSubKey(Application.ProductName).SetValue("label1", "20")
regKey.OpenSubKey(Application.ProductName, True).SetValue("label2", "50")
'/// if the key doesnt exist , create it / set it's values ^^^
'///
'/// if the key does exist ......
Label1.Text = regKey.OpenSubKey(Application.ProductName, False).GetValue("label1")
Label2.Text = regKey.OpenSubKey(Application.ProductName, False).GetValue("label2")
'/// get the values because it exists ^^^
i have never read a vb.net book in my life :rolleyes: , i have taught myself all i know and am proud of it :D , you aint offended me :) , it'll all start making sense as you stick with it.