How To Login To A Website Using Vb

Discussion in 'Programming' started by movvadinesh, Feb 1, 2008.

  1. #1
    I have made this code so it logs into bebo

    You will need to make:
    A Webbrowser Dosent matter make it as small as possible(webbrowser1)
    A Button (cmdlogin)
    Two Text Boxes (User & Pass)
    A label (lblstatus)

    Add This






    Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    If URL = "http://www.bebo.com/SignIn.jsp" Then
    WebBrowser1.Document.All("EmailUsername").Value = user.Text
    WebBrowser1.Document.All("Password").Value = pass.Text
    WebBrowser1.Document.All("SignIn").Click
    End If




    If lblStatus.Caption = "Login Sucessful" Then
    KewlButtons1.Enabled = True

    End If
    End sub



    Private Sub CmdLogin_Click()
    WebBrowser1.Navigate "http://www.bebo.com/SignIn.jsp"
    lblStatus.Caption = "Connecting to Bebo...."

    End Sub
     
    movvadinesh, Feb 1, 2008 IP
  2. protootorp

    protootorp Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I just recently decided to try the mozilla control instead of webbrowser which works pretty much the same. thing is it gets a error when trying to load the information. Here's the error. "method 'all' of object 'IHTMLDocument2' failed". Code does work on webbrowser. Curious if you could help me out.
     
    protootorp, Jul 27, 2008 IP