Make SURE you put Code:
Imports Microsoft.Win32
at the VERY top of the projectPic:
Click the picture
IF you want this to write when the project starts, double click the form and put the following code there:
Code:
Private Sub setregistryvalue()
'Add the executable's path against the application's name. 'Just change the key between (), and thats it.
Registry.SetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", _
Application.ProductName, _
Application.ExecutablePath)
End Sub
for button double click on the button and put the same code.