1、请教谁用.net开发过ActiveX控件?
2、使用C#开发的Windows控件,在web中使用
<object id="helloworld" classid="http:HelloWorld.dll#HelloWorld.Demo" width="184" height="96"></object>
怎么显示一白框?
进行以下设置后仍然显示一白框!
Microsoft .NET Framework 1.1 向导>调整.net安全性>Internet>完全信任

解决方案 »

  1.   

    可以开发,生成的时候生成为.com组件就可以了,但是不推荐,因为哪怕你要嵌到浏览器里,也是需要.net framework框架支持才可以运行的
      

  2.   

    可以开发,这个我知道啊。感谢你的回答。在网页中使用windows控件,怎么显示一白框呢?
      

  3.   

    IObjectSafe接口用于标记脚本安全。我们在编写ActiveX控件时,如果用在浏览器中,会弹出现在运行的脚本不安全的提示,如果给客户用,将会带来极大的不方便。
    msdn的解决办法:
    一、实现IObjectSafe接口
    二、修改注册表
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Runtime.InteropServices;namespace HelloWorld
    {
        [ComImport, GuidAttribute("CB5BDC81-93C1-11CF-8F20-00805F2CD064")]
        [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
        public interface IObjectSafety
        {
            [PreserveSig]
            int GetInterfaceSafetyOptions(ref Guid riid, [MarshalAs(UnmanagedType.U4)] ref int pdwSupportedOptions, [MarshalAs(UnmanagedType.U4)] ref int pdwEnabledOptions);        [PreserveSig()]
            int SetInterfaceSafetyOptions(ref Guid riid, [MarshalAs(UnmanagedType.U4)] int dwOptionSetMask, [MarshalAs(UnmanagedType.U4)] int dwEnabledOptions);
        }
    }