Hadleigh Gaudreau
Hadleigh Gaudreau

Reputation: 35

VB PictureBox and Web Browser

I currently have a picture box overlaying a web browser within my application I want the picture box to disappear when the website has loaded fully, is this possible? or do I need to simply add a timer to my Picture box with an average time it normally takes for the site to load, any recommendations?

Upvotes: 0

Views: 226

Answers (1)

c4pricorn
c4pricorn

Reputation: 3481

No timer is needed.
Set webbrowser event:

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
    PictureBox1.Visible = False
End Sub

Upvotes: 2

Related Questions