Click to See Complete Forum and Search --> : WebBrowser Event Control


Btang11111
February 4th, 2000, 09:00 PM
Hi,

How to print a message upon DownloadComplete event of VB Webbrowser DownloadComplete Even??
The Codes below brings up www.microsoft.com Webpage, but the 'WebBrowser1_DownloadComplete = True ' may not be coded correct
ly.

Pls help. (Do we need to use event handler? Or is the Return Value not Boolean?)


Private Sub Command1_Click()

WebBrowser1.Navigate "http://www.microsoft.com"

If WebBrowser1_DownloadComplete = True Then
MsgBox "WINNET"
End If
End Sub

February 5th, 2000, 11:12 AM
I haven't used the WebBrowser control, but it appears to me DownloadComplete is an event handler. In other words, in your example, I assume WebBrowser1_DownloadComplete procedure will be called. Therefore, as opposed to using WebBrowser1_DownloadComplete in an if statement, you need code like this...



private Sub WebBrowser1_DownloadComplete()
MsgBox "WINNET"
End Sub





FYI...There also appears to be an event handler named WebBrowser1_DocumentComplete, and there appears to be a WebBrowser1.Busy property which may be of interest to you.