Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi! This is my first time submitting to this forum, hopes that I will get good respond :) Ok, heres what I need - I am just starting to learn VB6 and have nearly finished my project. But I gotta know that just by using the normal If..Else for a password is a no, no in programming, and find out that theres a better way and that is 'Encapsulation'.
But I don't have any idea of how to do it, or actually whats all about. Is there a code sample lying anywhere on the WWW? Or if possible, anyone could supply me with a sample? I don't need a really good encryption, just how its done, will be greatly appreciated.
Cheers,
aboka

Beautiful Questin
i guess u r using a textfield to get the passsword from.
Now a very simplee option is to assign a value to textfiled say txtfield1 from the properties(I guess u know this).Now if u want to work with if and else then here is a solution
1) Create A text field
2) trap the on key pressed or gettext method
of the object(textfield)
3) private sub onkeypress()
if textfield1.text = "" then
textfield1.text="*"
else
textfield1.text = textfield1.text + "*"
end if
end subbye
if this works reply me aat raviop@rediffmail.com

The easiest way i have found if you dont care about 100% security, is in your text box set the password char to * or whatever you want then do your else if or however you would like to store the actual password like in a database or something.

![]() |
using MSN MSG WHEN LOG ON...
|
Control page-setup(margin...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |