Internet Explorer 9 RC stops my WinForms WebBrowser control to work in editing mode

后端 未结 9 1777
渐次进展
渐次进展 2020-12-09 13:45

Using the IHtmlDocument2.designMode property set to On to switch a WebBrowser control hosted on a Windows Forms form to editing mode suddenly stopp

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-09 14:43

    What's your exact code?

    If I set the following code:

        private void cbDesign_CheckedChanged(object sender, EventArgs e){
            var instance =
        Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(
        wbView.ActiveXInstance,
        null,
        @"Document",
        new object[0],
        null,
        null, null );
    
             var objArray1 = new object[] { cbDesign.Checked ? @"On" : @"Off" };
    
        Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSetComplex(
        instance,
        null,
        @"designMode",
        objArray1,
        null,
        null,
        false,
        true );
    

    The IE9 Web Browser instance enters designMode without any problems. If you change the "Zeta" example to not set the document text after entering design mode, it also works fine.

提交回复
热议问题