Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialogue Box for Password 2

Status
Not open for further replies.

RoguePoet01

Programmer
Oct 1, 2003
302
US
Hi,

I know I can do this with a form, but does anybody know an easy way to use the dialogue box in vb.net?

I need to prompt for a password, read SQL to see it the values match, then either allow or deny access to a form.

Thanks,

R
 
You could just use an input box:

Dim s As String = InputBox("enter password", "title", "default")

then compare s to your password, etc.

 
go professional, go form.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
What a wonderfull world - Louis armstrong
 
Just as a consideration, a form allocates a lot of memory in the .NET runtime compared to a modal like an input box. It may not be a concern for you, but just to log in you have a chunk of memory sitting around that will have to be deallocated by the runtime GC later on. I know, it doesn't make a difference most of the time, but sometimes it does.
 
but in the inputbox you can set it to password char like the stars

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
What a wonderfull world - Louis armstrong
 
I appreciate input from both of you.

It's good to know about the input box, since I've never had to use it before.

I went ahead with the form, partly because that's the only way I could figure out how to do it without wasting all day looking for the dialogue box answer.

The '*' characters are pretty cool, too.

Almost makes me look like a pro!

Ciao.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top