找不到类型或命名空间名称“IDocHostUIHandler”(是否缺少 using 指令或程序集引用?)

解决方案 »

  1.   

    http://www.codeproject.com/csharp/advhost.asp?print=true
      

  2.   

    这样的,首先你必须定义一下MsHtmHstInterop.idl接口的描述语言如下:[
        uuid(47F05070-FD66-45cc-AD99-74260F94A16B)
    ]
    library MsHtmHstInterop
    {
        import "MsHtmHst.idl";
        
        enum tagDOCHOSTUIDBLCLK;
        enum tagDOCHOSTUIFLAG;
        enum tagDOCHOSTUITYPE;
        
        interface ICustomDoc;
        interface IDocHostShowUI;
        interface IDocHostUIHandler;
        interface IDocHostUIHandler2;
        interface IHostDialogHelper;
    };然后在命令行输入以下两个步骤:
    midl MsHtmHstInterop.idl /tlb bin\MsHtmHstInterop.tlbtlbimp bin\MsHtmHstInterop.tlb /out:bin\MsHtmHstInterop.dll之后在工程中引用就可以了然后using MsHtmHstInterop;
      

  3.   

    请问我要取流览器中一个组件<input type=button id=test name=test>
    我该如何取?
    以上代码,我试了一下:
    HTMLButtonElement button = (HTMLButtonElement)doc.all.item("test", null);
    好象取不到.