الفرعون المحترف
11-26-2006, 11:15 AM
السلام عليكم
انا بتاع الجديد .. انا بتاع منتدى العملاقه..انا ليكوا..انتم وبس
تحت امركم ..اسعاعدكم بما استطعت..واعطيكم ما احببت..
شعر حلو صح..ههههههههههطيب عايز تخلي برنامجك يشتغل في startup
Imports Microsoft.Win32
Imports System.Windows.Forms
Public Sub RunatStartup(ByVal PutAtStartup As Boolean , ByVal ProgramName As String)
Dim StartupPath As String = "Software\Microsoft\Windows\CurrentVersion\Run"
Dim MyKey As RegistryKey = Registry.CurrentUser.OpenSubKey(StartupPath , True)
If PutAtStartup Then
MyKey.SetValue(ProgramName , Application.ExecutablePath)
Else
Try
MyKey.DeleteValue(ProgramName , False)
Catch ex As Exception
ex = Nothing
End Try
End If
End Sub
انا بتاع الجديد .. انا بتاع منتدى العملاقه..انا ليكوا..انتم وبس
تحت امركم ..اسعاعدكم بما استطعت..واعطيكم ما احببت..
شعر حلو صح..ههههههههههطيب عايز تخلي برنامجك يشتغل في startup
Imports Microsoft.Win32
Imports System.Windows.Forms
Public Sub RunatStartup(ByVal PutAtStartup As Boolean , ByVal ProgramName As String)
Dim StartupPath As String = "Software\Microsoft\Windows\CurrentVersion\Run"
Dim MyKey As RegistryKey = Registry.CurrentUser.OpenSubKey(StartupPath , True)
If PutAtStartup Then
MyKey.SetValue(ProgramName , Application.ExecutablePath)
Else
Try
MyKey.DeleteValue(ProgramName , False)
Catch ex As Exception
ex = Nothing
End Try
End If
End Sub



