ExclamationSimple verify system in vb2008

Posts 1–6 of 6 · Page 1 of 1
Simple verify system in vb2008
Hello this is a tut for beginners in vb, I'm gonna teach you how to make a simple verify system in vb 2008. You can bind this with different items to make you put in a password before the program opens. So heres the code for Button1:

Code:
If TextBox1.Text = "mpgh.net" Then
            MsgBox("Correct Password", MsgBoxStyle.OkCancel, "Correct")
            Me.Close()
        Else
            MsgBox("Fail Guess Again", MsgBoxStyle.RetryCancel, "Wrong Password")
        End If

        If TextBox1.Text = "" Then
            MsgBox("You didn't enter anything!", 64, "Invalid")
        End If

The msgbox styles can vary, thats just what i chose. The words in quotations after the message box styles are what the title of the msgbox is. PM me if you need any help with vb! Thank me if I helped!
Login.PNGattachment deleted · 63 downloads before removal
Better Code
Code:
 If TextBox1.Text.Length = 0 Then

        ElseIf TextBox1.Text = "mpgh.net" Then
            MsgBox("Correct Password!", vbOKCancel, "Close?")
            If vbOKCancel Then
                Me.Close()
            End If
        Else
            MsgBox("Wrong Pass!", vbRetryCancel, )
            If vbCancel Then
                Me.Close()
            End If
        End If
Quote Originally Posted by Iamazn View Post
Better Code
Code:
 If TextBox1.Text.Length = 0 Then

        ElseIf TextBox1.Text = "mpgh.net" Then
            MsgBox("Correct Password!", vbOKCancel, "Close?")
            If vbOKCancel Then
                Me.Close()
            End If
        Else
            MsgBox("Wrong Pass!", vbRetryCancel, )
            If vbCancel Then
                Me.Close()
            End If
        End If
Like I said, It's for beginners. Lol. Beginners wouldn't know that.
Leacher much. This is off Google.com
Quote Originally Posted by mariofan901 View Post
Leacher much. This is off Google.com
Who? Me or Monkey32?
Lol Iamazn, He was just kidding.
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us