Visual Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 17974
Number of posts: 55346

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
passwords Posted by princessLany on 5 Sept 2004 at 4:43 AM
how to make a program in visual basic verifying the password three times? thanks!
Report
Re: passwords Posted by Genjuro on 7 Sept 2004 at 1:19 AM
: how to make a program in visual basic verifying the password three times? thanks!
:

Well, the easier way is to put on a Form three TextBoxes (let's call them "TextBox1", "TextBox2" and "TextBox3", and a Command Button (CmdValidate).
In the CmdValidate_Click event, you just have to compare the values in the TextBoxes like this:

if (TextBox1.text = "<i>correct password goes here</i>") and (TextBox1.text = TextBox2.Text) and (TextBox1.text = TextBox3.Text) then 
   'the password is correct
else
   'wrong password somewhere
end if


For any other questions, feel free to ask.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.