by Ganti Jagannath Sastry (1 Submission)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 23rd December 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This application locks your desktop and can be disabled with password.
API Declarations
'********************************************************************************
'Simple Desktop Locking Program
'********************************************************************************
'How to write the code:
'From API load function SystemParametersInfo and paste in module
'Take new standard exe form with
' Textbox
' Commandbutton
' Image
' Labels
' Write the following code
' function SystemParametersInfo enables and disables keys combination
'*******************************************************************************
dim str
Private Sub cmdPass_Click()
If txtPass = "xyz" Then'desired password can be given
Unload Me
Else
MsgBox "Incorrect Password Please tyr again", , "Alert......."
txtPass = ""
txtPass.SetFocus
End If
End Sub
'***
Private Sub Form_Load()
str = SystemParametersInfo(97, 1, CStr(1), 0) 'Disable Ctrl+Alt+Del Keys combination
End Sub
'***
Private Sub Form_Unload(Cancel As Integer)
str = SystemParametersInfo(97, 0, CStr(1), 0) 'Enable Ctrl+Alt+Del Keys combination
End Sub
'**
Private Sub txtPass_KeyPress(KeyAscii As Integer)
'Allow ONLY key strokes such as A-Z,a-z,0-9 & BackSpace character.
If KeyAscii >= vbKeyA And KeyAscii <= vbKeyZ Or KeyAscii >= 97 And KeyAscii <= 122 Or KeyAscii >= vbKey0 And KeyAscii <= vbKey9 Or KeyAscii = vbKeyBack Then
'do nothing
Else
KeyAscii = 0
End If
End Sub
No comments have been posted about This application locks your desktop and can be disabled with password.. Why not be the first to post a comment about This application locks your desktop and can be disabled with password..