Results 1 to 3 of 3

Thread: [RESOLVED] Tell If Command Was Clicked

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    18

    Resolved [RESOLVED] Tell If Command Was Clicked

    Hi how would i tell if a command was clicked 3 times.I am trying to make a password protection for my app.I want it to check if the user clicks the command 3 times with the wrong serial it ends.Can someone post an example code thanks.

  2. #2
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Tell If Command Was Clicked

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Command1_Click()
    4. Static x As Integer
    5. 'Static variables store values as modular variables, but just inside
    6. 'the sub/function where they are declared
    7.    
    8.     x = x + 1
    9.     If Text1.Text = "password" Then
    10.          MsgBox "Ok, come in"
    11.     Else
    12.          MsgBox "Wrong Password"
    13.     End If
    14.     If x >= 3 Then Unload Me
    15. End Sub
    Last edited by jcis; Feb 18th, 2006 at 04:14 AM.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    18

    Re: Tell If Command Was Clicked

    thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width