Simple Sample Log in Form in VB6

Here's my simple log in form based from what I learn from VB6. There's a lot to learn, thousands of them or even millions!

Private Sub Command1_Click()
Dim username, password As String 'fuse both username and password

username = "klint" 'so the string is klint
password = "hope" 'so the string is hope

'remember the green color indicates a comment and not part of program

If (username = Text1.Text And password = Text2.Text) Then
Text1.Text = "" '"" means clear
Text2.Text = ""
MsgBox "Log-in successful!", _
vbInformation, _

Text1.Text = "" '"" means clear
Text2.Text = ""


Else: MsgBox "Log-in failed!", _
vbCritical, _

Text1.Text = ""
Text2.Text = ""

Unload Me

'we will add when failed log in it will automatically close log in form
'that's all, you can also play around this simple sample log in form

End If

End Sub

Popular posts from this blog

Manny Pacquiao vs Adrien Broner Fight Update

Manny Pacquiao vs. Keith Thurman Fight Results and Update

Removing powered by Phpfox