PDA

View Full Version : [VB6] Problem with Neo Login.



Duck4Cover
08-19-2013, 05:37 PM
I'm trying to make a Neo Login.
One I run the program and try to login I get this error:
[Only registered and activated users can see links]

Then when i click on debug, this is what it highlights:
[Only registered and activated users can see links]

Here is my whole code:

Private Sub cmdLogin_Click()
Dim strHTML As String

strHTML = w.GetWrapper("[Only registered and activated users can see links]")
strHTML = w.PostWrapper("[Only registered and activated users can see links]", "destination=&username=" & User & "&password=" & Pass, "[Only registered and activated users can see links]")

If InStr(1, strHTML, "badpassword") Then
MsgBox "Invalid Password/Username...", vbOKOnly, "ERROR"
ElseIf InStr(1, strHTML, "this account has been ") Then
MsgBox "This account has been frozen... :(", vbOKOnly, "ERROR"
ElseIf InStr(1, strHTML, "index") Then
MsgBox "You succesfully logged in as" & txtUser & "!", vbOKOnly, "ERROR"
cmdLogin.Enabled = False
cmdLogout.Enabled = True
Else
MsgBox "Unknown Error...", vbOKOnly, "ERROR"
End If
End Sub

Private Sub cmdLogout_Click()
Dim strHTML As String

strHTML = w.GetWrapper("[Only registered and activated users can see links]", "[Only registered and activated users can see links]")
strHTML = w.PostWrapper("[Only registered and activated users can see links]", "[Only registered and activated users can see links]")

If InStr(1, strHTML, "index") Then
MsgBox "Status:Logged Out", vbOKOnly, "YAY!"
End If
End Sub


Infamous Joe, Zachafer

If anyone could tell me what I could be doing wrong, I would really appreciate it :D

j03
08-19-2013, 06:03 PM
That means you are referencing an object that is not there. In this case it's your http wrapper, but from the pics I can see it on your form (the one with the "0" in it). Click on it and see if you named it "w" because that is what you are saying it is called in your code.

PS: It's best to move on from VB6 and try VB.NET.

Duck4Cover
08-19-2013, 06:07 PM
Thanks, I got it fixed xD
I've got VB.NET 2010 but I couldn't realy find too many guides/tutorials about it.