none
Web browser shows weird in VB application RRS feed

  • Question

  • So Ive been making a web browser, and it shows up weird, please see photos below, what can I do to fix this?

    You can see the top bar looks like some hyperlinks which is not what it is normally meant to look like

    Monday, February 4, 2019 12:45 PM

All replies

  • Hello,

    It's a guessing game unless you

    1. Show the source code.
    2. Explain exactly what the issue is.

    Better to provide more details then less else we will need to ask more questions.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, February 4, 2019 12:48 PM
    Moderator
  • Hi

    That is just an image! In what way do you want us to help to fix the Image?

    Maybe, if you post the code that you used to produce the Image, someone would be able to help.


    Regards Les, Livingston, Scotland

    Monday, February 4, 2019 12:50 PM
  • I just had this code

    Dim Url As String
            Url = ToolStripTextBox1.Text
            WebBrowser2.Navigate(Url)

    And it was taking a textbox input and telling a web-browser to navigate to it, but I'm getting a bit of glitches with the HTML

    Monday, February 4, 2019 12:54 PM
  • I just had this code

    Dim Url As String
            Url = ToolStripTextBox1.Text
            WebBrowser2.Navigate(Url)

    And it was taking a textbox input and telling a web-browser to navigate to it, but I'm getting a bit of glitches with the HTML

    As I said in my first reply be specific, a glitch can be one of hundred of things, be specific. 

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, February 4, 2019 12:58 PM
    Moderator
  • For example if I were to compare the website that the VB web browser loaded, compared to the likes of google chrome for example, you can see how its different

    You can clearly see that there are a few differences (Google chrome is the bottom one)

    Monday, February 4, 2019 1:02 PM
  • Hi

    .............. and the URL used is?

    Did the SAME URL produce both images?


    Regards Les, Livingston, Scotland

    Monday, February 4, 2019 1:06 PM
  • Yes, the url used is simply www.google.com, Its the same in both images, just different web browsers
    Monday, February 4, 2019 1:06 PM
  • The WebBrowser control is not a full fledged browser so expect this to happen as for one it doesn't know how to handle current API's of current browsers such as Chrome and FireFox. 

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, February 4, 2019 1:08 PM
    Moderator
  • Do you know how to fix it though
    Monday, February 4, 2019 1:10 PM
  • Do you know how to fix it though
    Don't use the .NET WebBrowser control. And note there are all kinds of hacks out there but what might work today might very well fail hours or days or months later so it's not worth hacking the browser.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites


    Monday, February 4, 2019 1:27 PM
    Moderator
  • Do you know how to fix it though

    Hi

    I believe it can not be 'fixed'. The Browser control is likely a very old piece of code which may not have been updated for a long time either.

    I would hazard a guess and say that nothing can be done to change the result from what you get.

    If I try the same URL that I am currently using for this site in Firefox, in the WebBrowser control, I get completely different pages.


    Regards Les, Livingston, Scotland

    Monday, February 4, 2019 1:28 PM
  • Does it help if you handle the Load event of the form and execute the next code?

    Dim k = 11001
    Dim n = My.Application.Info.AssemblyName
    
    Registry.SetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", n + ".exe", k)
    Registry.SetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", n + ".vshost.exe", k)
    Registry.SetValue("HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", n + ".exe", k)
    Registry.SetValue("HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", n + ".vshost.exe", k)

     

    See also: https://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version.


    Monday, February 4, 2019 1:40 PM
  • Do you know how to fix it though

    See Internet Feature Controls
    Monday, February 4, 2019 1:47 PM