using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Resources; // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SecurePassword")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SecurePassword")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AllowPartiallyTrustedCallers()] // Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(true)] // The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("A49D98D5-354D-42E1-99A3-0361781B1DAA")] // Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]

AssemblyInfo.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Windows.Forms; namespace SecurePassword
{
[Guid("C9BC5F05-9A41-4B45-94A6-CCFDD033CA9D")]
public class SecurePasswordInput : TextBox, IObjectSafety
{ public void GetInterfacceSafyOptions(int riid, out int pdwSupportedOptions, out int pdwEnabledOptions)
{
pdwSupportedOptions = ;
pdwEnabledOptions = ;
} public void SetInterfaceSafetyOptions(int riid, int dwOptionsSetMask, int dwEnabledOptions)
{
throw new NotImplementedException();
}
}
}

SecurePasswordInput.cs

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" language="javascript">
function showPassword() {
window.alert(form1.SecurePasswordInput.Text());
}
</script>
</head>
<body>
<form id="form1" action="Test.htm" method="post">
<object id="SecurePasswordInput" classid="clsid:{A49D98D5-354D-42E1-99A3-0361781B1DAA}">
<param name="PasswordChar" value="*" />
</object>
<input id="showInput" type="button" value="Click Me" onclick="showPassword();" /></form>
</body>
</html>

全部技术和代码出自 http://www.cnblogs.com/RCFans/archive/2008/11/15/1333982.html

签名的ActiveX控件还没搞出来在继续尝试

C#开发COM+组件和ActiveX控件的更多相关文章

  1. {VS2010C#}{WinForm}{ActiveX}VS2010C#开发基于WinForm的ActiveX控件

    在VS2010中使用C#开发基于WinForm的ActiveX控件 常见的一些ActiveX大部分是使用VB.Delphi.C++开发,使用C#开发ActiveX要解决下面三个问题: 使.NET组件可 ...

  2. 【VS开发】windows注册ActiveX控件

    ActiveX控件是一个动态链接库,是作为基于COM服务器进行操作的,并且可以嵌入在包容器宿主应用程序中,ActiveX控件的前身就是OLE控件.由于ActiveX控件与开发平台无关,因此,在一种编程 ...

  3. vs2012开发基于MFC的ActiveX控件

    1.新建工程 2.一直点击下一步,直到出现一下界面,注意红色标注选项,点击完成. 3.进入工程的属性界面,设置工程属性 4.添加对话框资源及其他控件,添加对话框类, 5.设置对话框属性 6.设置Dia ...

  4. 【VS开发】动态创建ActiveX控件

    bool CCollectDataDlgDlg::CreateMyCtrl(LPRECT lpRect, UINT nID, CWnd *pParent) {  CLSID clsid;  wstri ...

  5. 使用C#开发ActiveX控件(新)

    前言 ActiveX控件以前也叫做OLE控件,它是微软IE支持的一种软件组件或对象,可以将其插入到Web页面中,实现在浏览器端执行动态程序功能,以增强浏览器端的动态处理能力.通常ActiveX控件都是 ...

  6. 使用C#开发ActiveX控件(新) 转 http://www.cnblogs.com/yilin/p/csharp-activex.html

    前言 ActiveX控件以前也叫做OLE控件,它是微软IE支持的一种软件组件或对象,可以将其插入到Web页面中,实现在浏览器端执行动态程序功能,以增强浏览器端的动态处理能力.通常ActiveX控件都是 ...

  7. 使用C#开发ActiveX控件

    使用C#开发ActiveX控件(新) 前言 ActiveX控件以前也叫做OLE控件,它是微软IE支持的一种软件组件或对象,可以将其插入到Web页面中,实现在浏览器端执行动态程序功能,以增强浏览器端的动 ...

  8. ActiveX控件开发

    VC2005从开发MFC ActiveX ocx控件到发布到.net网站的全部过程 开篇语:最近在弄ocx控件发布到asp.net网站上使用,就是用户在使用过程中,自动下载安装ocx控件.(此文章也是 ...

  9. 使用C#开发ActiveX控件[new]

    文章出处:http://www.cnblogs.com/yilin/p/csharp-activex.html 前言 ActiveX控件以前也叫做OLE控件,它是微软IE支持的一种软件组件或对象,可以 ...

随机推荐

  1. 关于nginx限制IP或IP段的问题2011

    关于nginx限制IP或IP段的问题2011-04-08 16:46:39 分类: LINUX 最近有同事问需要在nginx中针对一些IP和IP段限制访问,通过了解以下方法可以解决问题:   首先建立 ...

  2. mutable关键字

    mutalbe的中文意思是“可变的,易变的”,跟constant(既C++中的const)是反义词.在C++中,mutable也是为了突破const的限制而设置的.被mutable修饰的变量(muta ...

  3. hdu 1863 畅通工程(最小生成树,基础)

    题目 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include<string.h> #include <ma ...

  4. Web前端业界氛围极好的群——鬼懿IT

    鬼群简介 鬼懿IT主群号:,鬼懿IT-成长群:181368696 , 创建于2005年12月 ,聚集的业内人事包括:阿当,大漠,辣妈,崔凯,Rei,周裕波,司徒正美,丸子,鬼森林,寒冬,franky, ...

  5. C#中dynamic的正确用法 以及 typeof(DynamicSample).GetMethod("Add");

    dynamic是FrameWork4.0的新特性.dynamic的出现让C#具有了弱语言类型的特性.编译器在编译的时候不再对类型进行检查,编译期默认dynamic对象支持你想要的任何特性.比如,即使你 ...

  6. 合并傻子//区间dp

    P1062 合并傻子 时间: 1000ms / 空间: 131072KiB / Java类名: Main 背景 从前有一堆傻子,钟某人要合并他们~但是,合并傻子是要掉RP的...... 描述 在一个园 ...

  7. [hackerrank]Service Lane

    https://www.hackerrank.com/challenges/service-lane 用RMQ做的,其实暴力也能过~ #include <iostream> #includ ...

  8. 【Linux高频命令专题(6)】mkdir

    简述 用来创建指定的名称的目录,要求创建目录的用户在当前目录中具有写权限,并且指定的目录名不能是当前目录中已有的目录. 命令格式 mkdir [选项] 目录... 命令参数 -m, --mode=模式 ...

  9. 90. Subsets II

    题目: Given a collection of integers that might contain duplicates, nums, return all possible subsets. ...

  10. OSSEC 安装执行./install.sh详细信息

    下载好ossec安装文件后解压得到如下目录 [root@localhost ~]# cd ossec-hids-/ [root@localhost ossec-hids-]# ll total drw ...