Code:
Private Sub cmdlogin_Click()
cmdlogin.Enabled = False
lblstatus.Caption = "Logging in!"
HTML = w.PostWrapper("http://www.neopets.com/login.phtml", "username=" & txtusername.Text & "&password=" & txtpassword.Text & "&destination=%2Findex.phtml", "http://www.neopets.com/hi.phtml")
If InStr(1, HTML, "badpassword") Then
lblstatus.Caption = "Wrong password!"
cmdlogin.Enabled = True
ElseIf InStr(1, HTML, "FROZEN") Then
lblstatus.Caption = "Account frozen!"
cmdlogin.Enabled = True
ElseIf InStr(1, HTML, "too many times") Then
lblstatus.Caption = "Guessed password too many times!"
cmdlogin.Enabled = True
elseif InStr(1, HTML, "Location: /index.phtml") <> 0 Then
lblstatus.Caption = "Logged in as " & txtusername.Text & ""
cmdlogin.Enabled = False
me.hide
frmmain.show
End If
End Sub