Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

strange things on DoEvents and WebBrowser....

Status
Not open for further replies.

hmcheung

Programmer
Oct 13, 2000
66
HK
Dear all,

I am facing quite a strange phenomenon about doevents. I'm using VB6 SP4 on win2k pro. I have these functions:
Code:
Private Sub Command1_Click()
    Web1.Navigate "[URL unfurl="true"]www.xyz.com"[/URL]
    Call Waiting
    MsgBox "asdf"
End Sub

Private Sub Command2_Click()
    Web1.Document.Forms("detail_form").empname.Value = "ABC"
    Web1.Document.Forms("detail_form").browse.Click
    Call Waiting
    MsgBox "as;df"
End Sub

Private Sub Waiting()
    Do Until Web1.ReadyState = READYSTATE_COMPLETE
        DoEvents
    Loop
End Sub

when I run these codes on my win2k pro, they work fine. The message box comes out after the whole page is loaded for both commands. however when I try to run them using VB6 SP4 on WinME, Command1 still works fine but for Command2 the msgbox comes out right after I pressed the button, before the whole page is loaded. I believe that there should be something wrong for my Waiting() on WinME. Is there any other alternatives for Waiting()? Thanks!! Please visit my WebCam!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top