قراءة قيمة من الريجسترى
Public Function ReadFromRegistry(ByVal Location As String, _
ByVal Name As String) As String
' Returns a value from the registry
Dim MyKey As Microsoft.Win32.RegistryKey
MyKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(Location)
ReadFromRegistry = CType(MyKey.GetValue(Name), String)
MyKey.Close()
End Function
أخذ جميع القيم الموجودة فى مجلد الريجسترى
Dim Reg As Microsoft.Win32.RegistryKey
Reg = Microsoft.Win32.Registry.CurrentUser
Dim Str As String
For Each Str In Reg.GetValueNames()
MsgBox(Str)
Next
حذف مجلد من الريجسترى
Dim Reg As Microsoft.Win32.RegistryKey
Reg = Microsoft.Win32.Registry.CurrentUser
Reg.DeleteSubKey("MiCcSoft")
كتابة قيمة فى الريجسترى
Public Sub WriteToRegistry(ByVal Location As String, _
ByVal Name As String, ByVal Data As String)
' Writes a value to the registry
Dim MyKey As Microsoft.Win32.RegistryKey
MyKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(Location)
MyKey.SetValue(Name, Data)
MyKey.Close()
End Sub
أخذ جميع المجلدات الموجودة فى مجلد الريجسترى
Dim Reg As Microsoft.Win32.RegistryKey
Reg = Microsoft.Win32.Registry.CurrentUser
Dim Str As String
For Each Str In Reg.GetSubKeyNames()
MsgBox(Str)
Next
إدراج مجلد فى الريجسترى
Dim Reg As Microsoft.Win32.RegistryKey
Reg = Microsoft.Win32.Registry.CurrentUser
Reg.CreateSubKey("MiCcSoft")
Please SUBSCRIBE to get new articles directly into your Email inbox!
Public Function ReadFromRegistry(ByVal Location As String, _
ByVal Name As String) As String
' Returns a value from the registry
Dim MyKey As Microsoft.Win32.RegistryKey
MyKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(Location)
ReadFromRegistry = CType(MyKey.GetValue(Name), String)
MyKey.Close()
End Function
أخذ جميع القيم الموجودة فى مجلد الريجسترى
Dim Reg As Microsoft.Win32.RegistryKey
Reg = Microsoft.Win32.Registry.CurrentUser
Dim Str As String
For Each Str In Reg.GetValueNames()
MsgBox(Str)
Next
حذف مجلد من الريجسترى
Dim Reg As Microsoft.Win32.RegistryKey
Reg = Microsoft.Win32.Registry.CurrentUser
Reg.DeleteSubKey("MiCcSoft")
كتابة قيمة فى الريجسترى
Public Sub WriteToRegistry(ByVal Location As String, _
ByVal Name As String, ByVal Data As String)
' Writes a value to the registry
Dim MyKey As Microsoft.Win32.RegistryKey
MyKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(Location)
MyKey.SetValue(Name, Data)
MyKey.Close()
End Sub
أخذ جميع المجلدات الموجودة فى مجلد الريجسترى
Dim Reg As Microsoft.Win32.RegistryKey
Reg = Microsoft.Win32.Registry.CurrentUser
Dim Str As String
For Each Str In Reg.GetSubKeyNames()
MsgBox(Str)
Next
إدراج مجلد فى الريجسترى
Dim Reg As Microsoft.Win32.RegistryKey
Reg = Microsoft.Win32.Registry.CurrentUser
Reg.CreateSubKey("MiCcSoft")
Please SUBSCRIBE to get new articles directly into your Email inbox!
تعليقات
إرسال تعليق