السلام عليكم
عمل الكود تعطيل وتفعيل نافذة الرجستري
بيئة العمل VB 2003 - 2019
كود PHP:
Public Class Form1
Private Sub EnableDisableRegedit(ByVal EnDis As Boolean)
Try
Dim Key As String = _
"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\" &
"CurrentVersion\Policies\System"
Dim Value As String = "DisableRegistryTools"
If EnDis = True Then
My.Computer.Registry.SetValue(Key, Value, _
0, Microsoft.Win32.RegistryValueKind.DWord)
Else
My.Computer.Registry.SetValue(Key, Value, _
1, Microsoft.Win32.RegistryValueKind.DWord)
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
EnableDisableRegedit(False)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
EnableDisableRegedit(True)
End Sub
End Class
'1-تعطيل وتفعيل نافذة الرجستري