Div 在 WebBrowser 中被拖动而不是水平滚动

Div is dragged instead of horizontal scroll in WebBrowser

在带有 IE11 的 WinForm 应用程序 (Framework 3.5) 中,一个简单的 HTML 页面具有水平滚动内容而不是滚动拖动页面:

如果我单独打开 IE11,它会滚动。

WebBrowser 创建如下:

Private Sub VediTagli()
    Dim webNEWTES As New WebBrowser
    webNEWTES.Name = "webNEWTES"

    webNEWTES.ScriptErrorsSuppressed = True
    'webNEWTES.WebBrowserShortcutsEnabled = False
    webNEWTES.IsWebBrowserContextMenuEnabled = False



    'AddHandler webNEWTES.DocumentCompleted, AddressOf webNEWCLI_DocumentCompleted
    AddHandler webNEWTES.Navigating, AddressOf webNEWTES_Navigating
    AddHandler webNEWTES.DocumentCompleted, AddressOf webNEWTES_DocumentCompleted
    webNEWTES.Top = lstDETT.Top
    webNEWTES.Left = lstDETT.Left
    webNEWTES.Height = lstDETT.Height
    webNEWTES.Width = lstDETT.Width




    webNEWTES.Visible = True
    If SONO_IN_MODIFICA_BP = True Then
        webNEWTES.Navigate("http://127.0.0.1/webquery/VisualTicket.aspx?ORARIO=" & Format(DateTime.Now, "HH.mm.ss"))
    Else
        webNEWTES.Navigate("http://127.0.0.1/webquery/VisualTicket.aspx?client=true" & "&ORARIO=" & Format(DateTime.Now, "HH.mm.ss"))
    End If

    'webNEWTES.Url = New Uri("http://127.0.0.1/webquery/VisualTicket.aspx?client=true")
    'webNEWTES.Navigate(IP_CREACLI & "&ORARIO=" & Format(DateTime.Now, "HH.mm.ss"), Nothing, Nothing, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)")

    'webNEWTES.DocumentText = ""
    'webNEWTES.Navigate("about:blank")
    webNEWTES.BringToFront()
    Panel2.Controls.Add(webNEWTES)
End Sub

已通过在系统寄存器中禁用旧版输入模型解决了该问题。

根据 docs 需要禁用 FEATURE_NINPUT_LEGACYMODE 如下:

HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
   SOFTWARE
      Microsoft
         Internet Explorer
            Main
               FeatureControl
                  FEATURE_NINPUT_LEGACYMODE
                     contoso.exe = (DWORD) 00000000