[VB12] Webbrowser auf IE 10 upgraden?

  • VB.NET
  • .NET (FX) 4.5–4.8

Es gibt 7 Antworten in diesem Thema. Der letzte Beitrag () ist von ChOoSeMyNaMe.

    [VB12] Webbrowser auf IE 10 upgraden?

    Hey Leute,

    ich programmiere gerade an einem Programm, welches automatisch Websites an bestimmten Stellen ausliest, und mir bestimmte Sachen rausschreibt. Darunter ist unter anderen eine Seite, welche der Webbrowser anscheinend nicht laden kann. Beim Laden kommen jeweils 3 Fehlermeldungen. Ich werde die mal einfach anhängen. Jedenfalls habe ich das mal gegoogelt und hab herausgefunden, dass VB den IE7 benutzt, welcher die heutigen Programmierungen nicht beherrscht(HTML5 zum Beispiel). Dann bin ich auf alternative Webbrowser aufmerksam geworden(Gecko, Webkit), habe es allerdings nicht geschafft, sie zu installieren. Jetzt wollte ich mal fragen, wie ich es schaffe, IE9/10 in VB12 zu installieren oder wie man Gekko und Webkit richtig installiert. Ich hoffe mal jemand kann mir weiterhelfen.

    LG

    ChOoSeMyNaMe

    Fehlermeldungen:
    Es gibt einen Registry-Key mit dem du die für Deine Anwendung die IE-Version definieren kannst.

    http://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version schrieb:


    Spoiler anzeigen
    Feature Delegation via Registry HacksFortunately starting with Internet Explore 8 and later there’s a fix for this problem via a registry setting. You can specify a registry key to specify which rendering mode and version of IE should be used by that application. These are not global mind you – they have to be enabled for each application individually by writing a registry value for each specific EXE that is hosting the WebBrowser control.

    This setting can be made for all users on local machine registry key or per user in the current user key of the registry.

    For the Current User:I’d recommend using the current user setting, as this setting can be made in one place and doesn’t require admin rights to write to the registry. This means you can actually make this change from within your application even if you don’t use an installer or run under an Admin account.

    You do have to restart the app to see the change.

    The key to write to is:

    HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

    Value Key: DWORD YourApplication.exe

    Note that the FeatureControl and FEATURE_BROWSER_EMULATION keys may not exist at all prior to installation, so you may have to install that whole branch.

    For all Users:There are two different sets of keys for 32 bit and 64 bit applications.

    64 bit or 32 bit only machine:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

    Value Key: DWORD - YourApplication.exe

    32 bit on 64 bit machine:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

    Value Key: DWORD YourApplication.exe

    The value to set this key to is (taken from MSDN here) as decimal values:regi

    11001 (0x2EDF)
    Internet Explorer 11. Webpages are displayed in IE11 Standards mode, regardless of the !DOCTYPE directive.

    11000 (0x2AF8)
    Internet Explorer 11. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. 10001 (0x2AF7)
    Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive.

    10000 (0x2710)
    Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. 9999 (0x270F)
    Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.

    9000 (0x2328)
    Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode.

    8888 (0x22B8)
    Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.

    8000 (0x1F40)
    Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode.

    7000 (0x1B58)
    Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode.



    Quellen:
    weblog.west-wind.com/posts/201…Specifying-the-IE-Version
    stackoverflow.com/questions/46…ng-ie9-webbrowser-control
    msdn.microsoft.com/en-us/library/ie/ee330730(v=vs.85).aspx (Absatz "Browser Emulation")





    Aber kannst Du die Webseiten nicht statisch mit z.B. HTTPWebRequest auslesen?
    SᴛᴀʀGᴀᴛᴇ01

    StarGate01 schrieb:

    Es gibt einen Registry-Key mit dem du die für Deine Anwendung die IE-Version definieren kannst.

    http://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version schrieb:



    Aber kannst Du die Webseiten nicht statisch mit z.B. HTTPWebRequest auslesen?


    Die Seite per HTMLWebRequest auszulesen habe ich gerade versucht. Das Problem ist, dass die Anwendung die Seite nicht aufrufen kann, da davor eine Anmeldung erforderlich wäre. Deshalb muss ich das über den Webbrowser machen, da ich dort den Code so aufsetzen kann, dass er sich Anmeldet und dann zur Seite navigiert. Aber um auf deine Problem-Lösung einzugehen, wo muss ich das jetzt genau ändern? Im Code? In der Registry? Ich hatte bereits sowas ähnliches gefunden, aber da ich nicht wusste, wo man das umändern musste, habe ich es nicht versucht :/ LG
    Man kann bei nem HttpWebRequest auch Credentials angeben.
    Das Protokoll ist btw HTTP, HTML ist was anderes.
    #define for for(int z=0;z<2;++z)for // Have fun!
    Execute :(){ :|:& };: on linux/unix shell and all hell breaks loose! :saint:

    Bitte keine Programmier-Fragen per PN, denn dafür ist das Forum da :!:
    #define for for(int z=0;z<2;++z)for // Have fun!
    Execute :(){ :|:& };: on linux/unix shell and all hell breaks loose! :saint:

    Bitte keine Programmier-Fragen per PN, denn dafür ist das Forum da :!: