Results 1 to 36 of 36

Thread: WebBrowser Control

  1. #1

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    WebBrowser Control

    Hi,
    Have a look at this page:-

    http://webmail.vsnl.com/

    I want to login to my VSNL account through VB using Web Browser Control. Is it possible?


    How to fill the textboxes and click on login button using VB?
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  2. #2
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    Re: WebBrowser Control

    Sure - what's your username and password?

    Just kidding, actually I do this to get information from my contractor's websites all time.
    Code:
    Sub getMail()
    Dim ie As Object, wsh As Long, x As Object
    Set ie = CreateObject("Internetexplorer.Application")
        ie.navigate ("http://webmail.vsnl.com/")
        While ie.busy: DoEvents: Wend
        ie.Visible = True
        While ie.busy: DoEvents: Wend
        'your user id
        ie.document.Forms(0).Elements("userid").Value = "user"
        'your password
        ie.document.Forms(0).Elements("password").Value = "password"
        'your server
        For Each x In ie.document.Forms(0).Elements("server").Options
            If x.Value = "vsnl.com" Then x.Selected = True
        Next
        
        ie.document.Forms(0).submit
    
        While ie.busy: DoEvents: Wend
        
        msgbox "you're in!!!-click OK to close browser"
    
        While ie.busy: DoEvents: Wend
        ie.Quit
    
    Set ie = Nothing
    End Sub
    Try this - note where I put comments for user name and password and server. If you study HTML Dom you could navigate the entire site. Remove the quit statement and the browser wont close.

    http://www.w3schools.com/htmldom/default.asp
    Last edited by technorobbo; Dec 13th, 2008 at 03:42 PM.
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

  3. #3

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    Thanks for the code. Its showing invalid username or password. It was happening so fast. So I used camstudio to record and i found the user, sever and password was correct.
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  4. #4

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    I have tried the code for yahoo. It worked.
    PHP Code:
    Dim i As Integer
    Sub getMail
    ()
    Dim ie As Objectwsh As LongAs Object
    Set ie 
    CreateObject("Internetexplorer.Application")
        
    ie.Navigate ("http://mail.yahoo.com")
        While 
    ie.BusyDoEventsWend
        ie
    .Visible True
        
    While ie.BusyDoEventsWend
        
        
    'your user id
        ie.Document.Forms(0).Elements("login").Value = "username"
        '
    your password
        ie
    .Document.Forms(0).Elements("passwd").Value "mypass"
         
        
    While ie.BusyDoEventsWend
        
        ie
    .Document.Forms(0).submit

        
    While ie.BusyDoEventsWend
        
        MsgBox 
    "you're in!!!-click OK to close browser"

        
    While ie.BusyDoEventsWend
        ie
    .Quit

    Set ie 
    Nothing
    End Sub



    Private Sub Command1_Click()
    Call getMail
    End Sub 
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  5. #5

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    Sometimes it gives error "Object variable not set or with block variable" in my yahoo mail code
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: WebBrowser Control

    On what line do you encounter the error?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  7. #7

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    The following line:-

    Code:
    ie.Document.Forms(0).Elements("login").Value = user
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  8. #8

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    What does the error mean?

    Though I have wrote "On Error Resume Next" line at the beginning of function. Now its fixed.
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  9. #9
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: WebBrowser Control

    Could you try it like this? It will just check if it's state is ready.
    Code:
    Sub getMail()
        Dim ie As Object
        Dim wsh As Long
        Dim x As Object    
    
        Const READYSTATE_COMPLETE = 4
    
        Set ie = CreateObject("Internetexplorer.Application")
    
        ie.Navigate ("http://mail.yahoo.com")
        While ie.Busy
            DoEvents
        Wend
        
        While ie.ReadyState <> READYSTATE_COMPLETE
            DoEvents
        Wend
        
        ie.Visible = True
        While ie.Busy
            DoEvents
        Wend
         
        'your user id
        ie.Document.Forms(0).Elements("login").Value = "username"
        'your password
        ie.Document.Forms(0).Elements("passwd").Value = "password"
          
        While ie.Busy: DoEvents: Wend
         
        ie.Document.Forms(0).submit
    
        While ie.Busy: DoEvents: Wend
         
        MsgBox "you're in!!!-click OK to close browser"
    
        While ie.Busy: DoEvents: Wend
        ie.Quit
    
        Set ie = Nothing
    End Sub
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  10. #10

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    Though your code is not giving error as before but it shows worng ID and password when i use it for webmail.vsnl.com

    Upto filling the textbox its OK but when the submit code is executed then the webpage shows error but when i manually click the submit button then it logs in to my account.

    I have also applied the timer but it was of no use.

    Code:
     Dim ie As Object
    Public Function getMail()
       
       Dim wsh As Long
        Dim x As Object
    
        Const READYSTATE_COMPLETE = 4
    
        Set ie = CreateObject("Internetexplorer.Application")
    
        ie.Navigate ("http://webmail.vsnl.com")
        While ie.Busy
            DoEvents
        Wend
        
        While ie.ReadyState <> READYSTATE_COMPLETE
            DoEvents
        Wend
        
        ie.Visible = True
        While ie.Busy
            DoEvents
        Wend
         
        'your user id
        ie.document.Forms(0).Elements("userid").Value = "MYID"
        'your password
        ie.document.Forms(0).Elements("password").Value = "MYPASS"
        ie.document.Forms(0).Elements("server").Options.Value = "vsnl.net"
        
         
    
        While ie.Busy: DoEvents: Wend
         
     Timer1.Enabled = True
    End Function
    Private Sub Command1_Click()
    Call getMail
    End Sub
    
    Private Sub Timer1_Timer()
    ie.document.Forms(0).submit
    Timer1.Enabled = False
    End Sub
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  11. #11

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    Here are the screen-shots of the page after executing the program:-


    By the way, HAPPY NEW YEAR!
    Attached Images Attached Images   
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  12. #12
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: WebBrowser Control

    What error is raised when you submit the form?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  13. #13

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    Error is not raised. But when the submit is done through Program then it doesn't work. The webpage shows " Wrong User ID or Password ".(Though UserID and password is correct) When I manually click submit button then it works.
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  14. #14
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: WebBrowser Control

    How are you submitting programatically?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  15. #15

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    ie.document.Forms(0).submit
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  16. #16
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    Re: WebBrowser Control

    You can't set option value it must be and index!

    incorrect:
    Code:
    ie.document.Forms(0).Elements("server").Options.Value = "vsnl.net"
    correct:
    Code:
        For Each x In ie.document.Forms(0).Elements("server").Options
            If x.Value = "vsnl.net" Then x.Selected = True
        Next
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

  17. #17

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    @techno

    No, Its selected. See the screen-shots posted above. I also tried your code, its selecting but again the webpage is throwing error.
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  18. #18
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: WebBrowser Control

    Could you post all the relevant codes?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  19. #19
    Lively Member wiz....'s Avatar
    Join Date
    Nov 2008
    Location
    Asia, Earth, Solar System, Milky Way Galaxy, Near Andromeda Galaxy, Universe
    Posts
    78

    Re: WebBrowser Control

    How can i do it for vbforums.com ??? i tried the following code and it didn't work.


    Code:
    Dim i As Integer
    Sub getMail()
    Dim ie As Object, wsh As Long, x As Object
    Set ie = CreateObject("Internetexplorer.Application")
        ie.Navigate ("http://vbforums.com")
        While ie.Busy: DoEvents: Wend
        ie.Visible = True
        While ie.Busy: DoEvents: Wend
        
        'your user id
        ie.Document.Forms(0).Elements("login").Value = "wiz...."
        'your password
        ie.Document.Forms(0).Elements("passwd").Value = "password"
         
        While ie.Busy: DoEvents: Wend
        
        ie.Document.Forms(0).submit
    
        While ie.Busy: DoEvents: Wend
        
        MsgBox "you're in!!!-click OK to close browser"
    
        While ie.Busy: DoEvents: Wend
        ie.Quit
    
    Set ie = Nothing
    End Sub
    
    
    
    Private Sub Command1_Click()
    Call getMail
    End Sub
    Last edited by wiz....; Jan 3rd, 2009 at 07:11 AM.
    PAIN n SUFFERING-Pain is Inevitable,,suffering is optional...........
    WORK EXPECTATION--U can do anything in this world if u don't look for credit.........

  20. #20
    Lively Member wiz....'s Avatar
    Join Date
    Nov 2008
    Location
    Asia, Earth, Solar System, Milky Way Galaxy, Near Andromeda Galaxy, Universe
    Posts
    78

    Re: WebBrowser Control

    btw who logged into ma account??????????plz PM me....
    PAIN n SUFFERING-Pain is Inevitable,,suffering is optional...........
    WORK EXPECTATION--U can do anything in this world if u don't look for credit.........

  21. #21

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    Code:
     Dim ie As Object
    Public Function getMail()
       
       Dim wsh As Long
        Dim x As Object
    
        Const READYSTATE_COMPLETE = 4
    
        Set ie = CreateObject("Internetexplorer.Application")
    
        ie.Navigate ("http://webmail.vsnl.com")
        While ie.Busy
            DoEvents
        Wend
        
        While ie.ReadyState <> READYSTATE_COMPLETE
            DoEvents
        Wend
        
        ie.Visible = True
        While ie.Busy
            DoEvents
        Wend
         
        'your user id
        ie.document.Forms(0).Elements("userid").Value = "avinternational"
        'your password
        ie.document.Forms(0).Elements("password").Value = "password"
         For Each x In ie.document.Forms(0).Elements("server").Options
            If x.Value = "vsnl.net" Then x.Selected = True
        Next
        
         
    
        While ie.Busy: DoEvents: Wend
         
     Timer1.Enabled = True
    End Function
    Private Sub Command1_Click()
    Call getMail
    End Sub
    
    Private Sub Timer1_Timer()
    ie.document.Forms(0).submit
    Timer1.Enabled = False
    End Sub
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  22. #22

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    Pl help dee-u
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  23. #23
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: WebBrowser Control

    I am not sure what's wrong since I cannot test it fully without a valid username and password, of course I always get an 'invalid' error. Could it be that the form has a different index?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  24. #24
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    Re: WebBrowser Control

    @Wiz

    Each Webpage is different - so you have to examine the source.

    In the case of VBforums the search form is first and the login is second. Also the Names of the controls are specific to the form, the correct code is below,
    Make sure you logoff before trying to log in.
    Code:
    Private Sub Command1_Click()
    Dim i As Integer
    Dim ie As Object, wsh As Long, x As Object
    Set ie = CreateObject("Internetexplorer.Application")
        ie.Navigate ("http://vbforums.com")
        While ie.Busy: DoEvents: Wend
        ie.Visible = True
        While ie.Busy: DoEvents: Wend
        
        'your user id
        ie.Document.Forms(1).Elements("vb_login_username").Value = "youlogin"
        'your password
        ie.Document.Forms(1).Elements("vb_login_password").Value = "yourpassword"
         
        While ie.Busy: DoEvents: Wend
        
        ie.Document.Forms(1).submit
    
        While ie.Busy: DoEvents: Wend
        
        MsgBox "you're in!!!-click OK to close browser"
    
        While ie.Busy: DoEvents: Wend
        ie.Quit
    
    Set ie = Nothing
    End Sub
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

  25. #25

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    @techno

    You r right. In my case the code is absolutely correct. The webpage is filling up with correct values. Now i will give my user and pass to dee-u through private message.
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  26. #26

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    Hey! Dee-U i have sent you the User and Pass for webmail.vsnl.com.
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  27. #27
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: WebBrowser Control

    Cheers pal, here's how you will submit it. You can now change your password!

    Code:
    ie.document.All("Submit").Click
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  28. #28

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    Thanks. Actually now i am using MS-OUTLOOK but i just asked because i was curious to know.

    Thanks very much.

    How you identified it. Is it because of this code ?

    <input name="Submit" type="submit" class="blue11b" value="Sign In" onclick="post();">
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  29. #29

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    I am making an application which Checks mail and also only shows No. of Yahoo Mails Total and Unread in a label.

    I have successfully done that by using INET control and string handling function.

    The only problem is that i want that the ie window should not be visible. Though i have set the boolean value to false but then also a window opens with this URL. Its only in case of yahoo webpage:-

    http://search.yahoo.com/web?fr=ush1-mail
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  30. #30

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    Code:-

    Code:
    Sub getMail(v As Boolean)
    On Error Resume Next
    Dim ie As Object, wsh As Long, x As Object
    
    Set ie = CreateObject("Internetexplorer.Application")
        ie.Navigate ("http://mail.yahoo.com")
      While ie.Busy
            DoEvents
        Wend
        
        While ie.ReadyState <> READYSTATE_COMPLETE
            DoEvents
        Wend
          ie.Visible = False
            While ie.Busy
            DoEvents
        Wend
       
        'your user id
        ie.Document.Forms(0).Elements("login").Value = Text1.Text
        'your password
        ie.Document.Forms(0).Elements("passwd").Value = Text2.Text
         
        While ie.Busy
        DoEvents
        Wend
        
        ie.Document.Forms(0).submit
        
    
        While ie.Busy: DoEvents: Wend
        loc = ie.LocationURL
      
         
    End Sub
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  31. #31
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: WebBrowser Control

    Yes, that was my clue and tried it and it worked like a charm. If you are using INET then why are you still using IE? I could not understand what you meant, perhaps it needs another thread for such diversce concern.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  32. #32

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: WebBrowser Control

    If you are using INET then why are you still using IE?

    Actually i am using it to accomplish two different task. I know it can be done only by using INET but still i want to know the reason of the webpage that is opening. When the value is set to true then two window appears.

    I want to know Why ?
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  33. #33
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: WebBrowser Control

    Not sure about the window that appears but instead of IE you can use your own WebBrowser which acts the same as IE.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  34. #34
    Lively Member
    Join Date
    Aug 2008
    Posts
    100

    Re: WebBrowser Control

    Quote Originally Posted by technorobbo View Post
    'your user id
    ie.Document.Forms(1).Elements("vb_login_username").Value = "youlogin"
    'your password
    ie.Document.Forms(1).Elements("vb_login_password").Value = "yourpassword"

    While ie.Busy: DoEvents: Wend

    ie.Document.Forms(1).submit
    [/CODE]
    Hi guys, I was looking at this thread and am able to reproduce the great advice given.

    What I am interested in is that the opening of a form, entering information into the boxes and "clicking" on the submit seems old. I am a beginner so please forgive me when I am misunderstanding something here, but couldn't we just shorten the logon to a single URL or to what ever clicking on the Submit button does?

    Isnt the "click" going to submit a url something like this?

    Code:
    www.whatever......php?vb_login_username=youlogin&vb_login_password=yourpassword
    thus why cannot we just navigate directly to this in the first instance?

  35. #35
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    Re: WebBrowser Control

    That would work in a "GET" Method form but not in a "POST" Method form.
    Here's the W3 link
    http://www.w3.org/MarkUp/html-spec/h..._8.html#SEC8.2
    Last edited by technorobbo; Apr 19th, 2009 at 04:30 PM.
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

  36. #36
    Lively Member
    Join Date
    Aug 2008
    Posts
    100

    Re: WebBrowser Control

    Thanks for replying.

    I am actually doing some googling on it right now. seems I have this

    http://www.developerfusion.com/artic...-a-web-page/2/

    I am actually looking at POST

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