Post Reply 
VB.net help
Author Message
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #15
RE: VB.net help
roberth - try looking into modal forms.  IDK how to do it in VB.NET, but in VB6, it would be something like:

Code:
F3.Show(Me, vbModal)

A modal form stops execution in the current form, like an InputBox.

Another point, your logic here is incorrect:

Code:
        Do
            lblAttempt.Text = "Enter password. This is attempt number " & Attempt
            Attempt = Attempt + 1
        Loop Until (Attempt = 4) Or (txtPass.Text = Password)

What you're saying is, set the label, increment a variable, then keep looping until you've incremented the variable to 4 (note that the label is set before the incrementation, so it will display "3").  The condition (txtPass.Text = Password) is irrelevant, as txtPass is never updated (the user is never given the chance).

What you should do is have some code like you did before, with the InputBox.  Instead of using an InputBox however, use a modal form.

02/11/2007 07:04 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
VB.net help - roberth - 11/10/2007, 11:38 AM
RE: VB.net help - UncertainGod - 11/10/2007, 11:47 AM
RE: VB.net help - ZiNgA BuRgA - 11/10/2007, 08:00 PM
RE: VB.net help - roberth - 12/10/2007, 02:21 AM
RE: VB.net help - diego - 12/10/2007, 02:32 AM
RE: VB.net help - ZiNgA BuRgA - 12/10/2007, 03:25 AM
RE: VB.net help - roberth - 31/10/2007, 01:41 PM
RE: VB.net help - ZiNgA BuRgA - 31/10/2007, 06:43 PM
RE: VB.net help - |-Anubis-| - 31/10/2007, 06:46 PM
RE: VB.net help - ZiNgA BuRgA - 31/10/2007, 06:47 PM
RE: VB.net help - roberth - 01/11/2007, 04:22 AM
RE: VB.net help - roberth - 02/11/2007, 04:53 AM
RE: VB.net help - ZiNgA BuRgA - 02/11/2007, 07:07 AM
RE: VB.net help - roberth - 02/11/2007, 07:59 AM
RE: VB.net help - ZiNgA BuRgA - 02/11/2007 07:04 PM
RE: VB.net help - roberth - 03/11/2007, 04:04 AM
RE: VB.net help - ZiNgA BuRgA - 03/11/2007, 04:50 AM
RE: VB.net help - roberth - 03/11/2007, 05:00 AM
RE: VB.net help - ZiNgA BuRgA - 03/11/2007, 07:19 AM
RE: VB.net help - roberth - 04/11/2007, 05:36 AM
RE: VB.net help - ZiNgA BuRgA - 04/11/2007, 06:42 PM
RE: VB.net help - roberth - 10/12/2007, 03:06 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)

 Quick Theme: