Results 1 to 2 of 2

Thread: login to a web page using vb6 code

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2008
    Posts
    2

    login to a web page using vb6 code

    Hi

    I am looking for this code or help since long but wasn't lucky.
    Hope you can help me in this regards.

    My Problem:
    I need to login to a website I am a member of the site and I want to

    login from my vb code. I will enter my username and password in vb form and I need to show the website logged

    in in a web browser control. and I have to logoff on a click of a button.

    I have checked the view source of the web page, and the .js file, I exactly can see the variables and

    functions the webpage is using. but still I am not able to make my code work.

    so could u pls look into it and advice me with some code.

    Thanks

    Kal
    Last edited by [email protected]; Sep 24th, 2008 at 09:28 AM.

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: login to a web page using vb6 code

    These are the two input tags you need to fill in
    Code:
    <input type="text" name="email" value="" class="textblue" size="25"/>
    <input type="password" name="password" class="textblue" size="25"/>
    Using the WebBrowser control after you navigate to your site it will enter the _DocumentComplete event. In this event you must make sure the correct page is fully loaded by comparing the original URL you navigated to with the function argument URL. If they are the same then you do this:
    Code:
      '
      '
     WebBrowser1.Document.All("email").Value = your-user-id (or your-email) 
     WebBrowser1.Document.All("password").Value = your-password
      '
      '

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width