by Matt MacPhee (1 Submission)
Category: Encryption
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 18th May 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Very simple password protection.
API Declarations
You will need 2 textboxes, a command button and a timer all with standard names (i.e text1, text2, command1 and timer1) then add this code to form1. You will need 2 forms.
if text1.text="your chosen password goes here" then
msgbox"Correct Password Entered",vbinformation,"Access Granted"
form2.visible=true
form2.windowstate=2
form1.visible=false
else
msgbox"Incorrect Password Entered",vbcritical,"Access Denied"
end if
end sub
private sub timer1_timer()
text2=text2-1
if text2.text="10" then
msgbox"You have 10 seconds left",vbinformation,"This program will close in 10 seconds"
end if
end sub
'created by matt macphee
'email macpheematthew for more help
'MSJ Enterprises
private sub form_load()
text2.text="30"
msgbox"You have 30 seconds to enter a correct password",vbinformation,"Good luck"
form2.visible=false
end sub