dcsimg
Results 1 to 3 of 3
  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2017
    Location
    Nigeria
    Posts
    225

    lOADING A PAGE IN A WEB BROWSER INSIDE A FORM

    I am trying to load a webpage (www.google.com) into a web browser object i created and filled it inside a form
    (i.e property dock) and when i put this code inside the form onload event, the program displays a dialogue box for some security issues and the page doesn't load
    code
    Code:
    form1.Load (Sender As e.....)
    MyBrowser.navigate(www.google.com)
    Nothing I post is Self Reliable. Use it at your own risk

  2. #2
    Fanatic Member PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Newport, UK
    Posts
    773

    Re: lOADING A PAGE IN A WEB BROWSER INSIDE A FORM

    Quote Originally Posted by TATARPRO View Post
    I am trying to load a webpage (www.google.com) into a web browser object i created and filled it inside a form
    (i.e property dock) and when i put this code inside the form onload event, the program displays a dialogue box for some security issues and the page doesn't load
    code
    Code:
    form1.Load (Sender As e.....)
    MyBrowser.navigate(www.google.com)
    What exactly does the dialogbox say? The error might contain some useful information....

    Also, is there a reason you are trying to embed www.google.com into your page this way rather than perhaps using the google search API programatically?

  3. #3
    Fanatic Member
    Join Date
    Dec 2014
    Location
    VB6 dinosaur land
    Posts
    808

    Re: lOADING A PAGE IN A WEB BROWSER INSIDE A FORM

    Quote Originally Posted by TATARPRO View Post
    I am trying to load a webpage (www.google.com) into a web browser object i created
    Do you mean you made a user control or just that you dragged the standard WebBrowser onto a form? I did that latter and had no issue at all with this code.
    Code:
    Public Class Form1
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
            WebBrowser1.Navigate("www.google.com")
        End Sub
    
    End Class
    I assume you didn't copy and paste your code since you didn't have the required quote marks on the URL string so yours shouldn't compile anyway. I'm using VS2013 but targeted .Net 4.0.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width