|
-
Aug 20th, 2000, 02:07 PM
#1
Thread Starter
New Member
I'm making a program where you have to enter a passord, and then it executes another exe. I don't know how to do the last part but the password validation should be something like this right:
Private Sub Form_Load()
MsgBox "Please enter your password."
password = Int(password1)
Do
input1 = CInt(InputBox("Enter your password below."))
If (input1 = password) Then
MsgBox "Your password has been accepted."
Else
MsgBox "Invalid password, please try again", vbokonly, "Oops!"
End If
End If
Loop Until input1 = password
End Sub
-
(assuming "password1" is the password)
But that doesn't seem to work. can anyone help me with this?
-
Aug 20th, 2000, 02:14 PM
#2
transcendental analytic
Using a textbox you can have the * character instead of having it to show the password when you type it, just set passwordchar to "*"
Code:
Then in a commandbuttons click event you put
If text1="This is your password" then
Shell Yourfile,vbnormalfocus 'this executes yourfile, which is a string, in normal size with focus, check up shell in vb help
else
Msgbox "invalid password"
end if
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 20th, 2000, 02:54 PM
#3
-
Aug 20th, 2000, 03:18 PM
#4
Thread Starter
New Member
What?!!??!?!?!
first of all, i don't know what your talking about, and how to use the code (forgive me, i'm just a beginner), and second, i also don't know what to do with the code on the other page...
Maybe you could explain it a bit more...?
-
Aug 20th, 2000, 03:24 PM
#5
transcendental analytic
That's if you want to have an inputbox like the one you get inputbox function, but with password characters.
A bit easier, is to just have a form on which you place your textbox. Setting the textbox passwordchar property to *
And then you make a commandbutton, doubleclick it so that it's click event shows up, paste that code i gave you, replace Yourfile with the filename you want to run (quoted with"")
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|