Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial - Finished
#1
Decided to make something simple instead since there wont be many anticipants in this contest.

Difficulty: 1/5
Introduction: In case you added email on account creation, this will check if its correct or not. It will check if there is a "@" and a ".", since all emails has those. You can always tweak it to check for .com, .net etc..

In the Create Account Button, add this:
Code:
Dim i As Byte, a As Byte
a = 0
    For i = 1 To Len(Text1.Text)
        If Mid(Text1.Text, i, 1)  "@" Then
            a = a + 1
            If a = Len(Text1.Text) Then
                MsgBox ("Enter a correct email address!")
                Exit Sub
            End If
        End If
    Next i

a = 0
    For i = 1 To Len(Text1.Text)
        If Mid(Text1.Text, i, 1)  "." Then
            a = a + 1
            If a = Len(Text1.Text) Then
                MsgBox ("Enter a correct email address!")
                Exit Sub
            End If
        End If
    Next i
I know its pretty simple, but I wanted it for my game cause it makes it look more professional Smile
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)