You add code to a module, or the declaration section of your form, then then call it from a Form.
The only thing you need in your form isWhere the .exe is the name of your program.VB Code:
Private Sub Form_Load() SetRegValue HKEY_LOCAL_MACHINE, _ "Software\Microsoft\Windows\CurrentVersion\Run", "NotePad", "c:\windows\notepad.exe" End Sub




Reply With Quote