VB6 ブラウザ表示 忘れないように

今更ながら、レガシーのVB6でWebBrowserコントロールで
最近のWEBを見ると
ほとんど実行できない。javaスクリプトも全滅である。

好奇心で、外部ブラウザを起動できないかテストして見た

まずはcromeでは

    Dim GC As Variant
    Dim Url
    Url = "http://localhost/shijpc/login_vtop.html"
    Set GC = CreateObject("WScript.Shell")
    GC.Run ("chrome.exe -url " & Url)
    Exit Sub

ついでedgeでは

    Dim Brwsr As Variant
    Dim Url As String
    Set Brwsr = CreateObject("Shell.Application")
    Url = "microsoft-edge:" & "http://localhost/shijpc/login_vtop.html"
    Brwsr.ShellExecute Url

cromeで実行してcromeが無ければedgeで

    On Error GoTo ERR_Exe
    Dim GC As Variant
    Dim Url
    Url = "http://localhost/shijpc/login_vtop.html"
    Set GC = CreateObject("WScript.Shell")
    GC.Run ("chrome.exe -url " & Url)
    Exit Sub
    
ERR_Exe:
    Dim Brwsr As Variant
    Dim Url As String
    Set Brwsr = CreateObject("Shell.Application")
    Url = "microsoft-edge:" & "http://localhost/shijpc/login_vtop.html"
    Brwsr.ShellExecute Url

デスクトップ版はVS2017で対応しているがこの版のWebBrowserも
windowsUpdateで挙動が怪しくなる事を何度か経験しているので
内部でなく外部ブラウザを使うようにしている。