05-12-15, 09:13 PM
بعد اذن الاخ hassan
يمكن استخدامة بهذه الطريقة
يمكن استخدامة بهذه الطريقة
كود :
Try
Dim regKey As Microsoft.Win32.RegistryKey
If CheckBox5.Checked = True Then 'الاضافة ريجستري
regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True) ' مسارالريجستري
regKey.SetValue(Application.ProductName, Application.ExecutablePath) 'اسم و مسار المشروع
regKey.Close()
Else 'الازالة الريجستري
regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
regKey.DeleteValue(Application.ProductName, False)
regKey.Close()
End If
Catch ex As Exception
End Try

