zoukankan      html  css  js  c++  java
  • ActiveX在.NET 2005中的实现(一)

    http://homer.cnblogs.com/archive/2005/01/04/86473.aspx中看到了一篇关于如何名叫“用C#编写ActiveX控件”的文章,受益匪浅。
    但该文章可能是在旧版本的.NET开发环境中实现的,在.NET 2005怎么实现也没能成功实现,于是自己从头开始做了一个开发,几经周折终于实现,现在分享给大家。
    1、ActiveX在.NET中的实现
    image
    如上图所示在.NET中使用UserControl来实现ActiveX。代码如下。

    Areas

    2、其中,将在HTML中使用的方法在接口AxMyControl中实现,代码如下:

    Areas

    3、Assembly.cs中的特殊设置:
    1 // Setting ComVisible to false makes the types in this assembly not visible 
    2 // to COM components.  If you need to access a type in this assembly from 
    3 // COM, set the ComVisible attribute to true on that type.
    4 [assembly: ComVisible(true)]

  • 相关阅读:
    hadoop ha模式下,kill active的namenode节点后,standby的namenode节点没能自动启动
    Hadoop2.6.5单机安装
    hadoop HA集群搭建
    hadoop搭建HA集群之后不能自动切换namenode
    hadoop集群之HDFS和YARN启动和停止命令
    查看CentOS7 监听端口命令
    JournalNode的作用
    Secondary NameNode:它究竟有什么作用?
    CentOS7查看和关闭防火墙
    关于Hosts与network的异同之处
  • 原文地址:https://www.cnblogs.com/timy/p/1676983.html
Copyright © 2011-2022 走看看