CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2000
    Posts
    14

    WebBrowser Event Control

    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


  2. #2
    Guest

    Re: WebBrowser Event Control

    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.


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

Featured