Selasa, 11 Januari 2011

Source Code Windows Locker


Buat Form Baru
-Siapkan 9 Label

Langsung Saja

Label1 Beri Nama Hide_Desktop
Label2 Beri Nama Hide_StartButton
Label3 Beri Nama Hide_Taskabar
Label4 Beri Nama Hide_SystemClock
Label5 Beri Nama Hide_DeskProcess
Label6 Beri Nama Disable_AllKey
Label7 Beri Nama Disable_AltTab
Label8 Beri Nama Disable_TaskManager
Label9 Beri Nama Disable_CtrlAltDel

Lalu Masukkan Source Code Di bawah :
Option Explicit

' Functions inside the DLL
Private Declare Function Desktop_Show_Hide Lib "InjectApp.dll" (ByVal bShowHide As Boolean) As Integer
Private Declare Function StartButton_Show_Hide Lib "InjectApp.dll" (ByVal bShowHide As Boolean) As Integer
Private Declare Function Taskbar_Show_Hide Lib "InjectApp.dll" (ByVal bShowHide As Boolean) As Integer
Private Declare Function Clock_Show_Hide Lib "InjectApp.dll" (ByVal bShowHide As Boolean) As Integer
Private Declare Function Process_Desktop Lib "InjectApp.dll" (ByVal szDesktopName As String, ByVal szPath As String) As Integer
Private Declare Function Keys_Enable_Disable Lib "InjectApp.dll" (ByVal bEnableDisable As Boolean) As Integer
Private Declare Function AltTab1_Enable_Disable Lib "InjectApp.dll" (ByVal bEnableDisable As Boolean) As Integer
Private Declare Function AltTab2_Enable_Disable Lib "InjectApp.dll" (ByVal hWnd As Long, ByVal bEnableDisable As Boolean) As Integer
Private Declare Function TaskSwitching_Enable_Disable Lib "InjectApp.dll" (ByVal bEnableDisable As Boolean) As Integer
Private Declare Function TaskManager_Enable_Disable Lib "InjectApp.dll" (ByVal bEnableDisable As Boolean) As Integer
Private Declare Function CtrlAltDel_Enable_Disable Lib "InjectApp.dll" (ByVal bEnableDisable As Boolean) As Integer

Private Sub Exit_Click()
' Enable everything before quitting
Desktop_Show_Hide (True)
StartButton_Show_Hide (True)
Taskbar_Show_Hide (True)
Clock_Show_Hide (True)
Keys_Enable_Disable (True)
AltTab1_Enable_Disable (True)
AltTab2_Enable_Disable 0, True
TaskSwitching_Enable_Disable (True)
TaskManager_Enable_Disable (True)
CtrlAltDel_Enable_Disable (True)

' Close app
Unload MainFrm
End Sub

Private Sub Hide_Desktop_Click()
If Me![Hide_Desktop] Then
Desktop_Show_Hide (False)
Else
Desktop_Show_Hide (True)
End If
End Sub

Private Sub Hide_StartButton_Click()
If Me![Hide_StartButton] Then
StartButton_Show_Hide (False)
Else
StartButton_Show_Hide (True)
End If
End Sub

Private Sub Hide_Taskbar_Click()
If Me![Hide_Taskbar] Then
Taskbar_Show_Hide (False)
Else
Taskbar_Show_Hide (True)
End If
End Sub

Private Sub Hide_SystemClock_Click()
If Me![Hide_SystemClock] Then
Clock_Show_Hide (False)
Else
Clock_Show_Hide (True)
End If
End Sub

Private Sub Hide_DeskProcess_Click()
If Me![Hide_DeskProcess] Then
Process_Desktop "MyDesktop2", "Calc.exe"
Else

End If
End Sub

Private Sub Disable_AllKeys_Click()
If Me![Disable_AllKeys] Then
Keys_Enable_Disable (False)
Else
Keys_Enable_Disable (True)
End If
End Sub

Private Sub Disable_AltTab1_Click()
If Me![Disable_AltTab1] Then
AltTab1_Enable_Disable (False)
Else
AltTab1_Enable_Disable (True)
End If
End Sub

Private Sub Disable_AltTab2_Click()
If Me![Disable_AltTab2] Then
AltTab2_Enable_Disable 0, False
Else
AltTab2_Enable_Disable 0, True
End If
End Sub

Private Sub Disable_TaskSwitching_Click()
If Me![Disable_TaskSwitching] Then
TaskSwitching_Enable_Disable (False)
Else
TaskSwitching_Enable_Disable (True)
End If
End Sub

Private Sub Disable_TaskMgr_Click()
If Me![Disable_TaskMgr] Then
TaskManager_Enable_Disable (False)
Else
TaskManager_Enable_Disable (True)
End If
End Sub

Private Sub Disable_CtrlAltDel_Click()
If Me![Disable_CtrlAltDel] Then
CtrlAltDel_Enable_Disable (False)
Else
CtrlAltDel_Enable_Disable (True)
End If
End Sub

0 komentar:

Posting Komentar