易截截图软件、单文件、免安装、纯绿色、仅160KB

C# Active控件,并触发javascript事件

创建一个Winform用户控件 UserControl1
 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Reflection;
namespace MyActiveTest
{

[ComVisible(true)]
[ClassInterface(ClassInterfaceType.AutoDual)]
[ComSourceInterfaces(typeof(UserControl1Events))]
[Guid("B0CF6712-4798-424d-8D08-A1E1E2F53B74")]
public partial class UserControl1 : UserControl, IObjectSafety
{
public delegate void SubmitClickedHandler();
public event SubmitClickedHandler SubmitClicked;
public UserControl1()
{
InitializeComponent();
}
//
private string _mymessage;
public string Mymessage
{
get { return _mymessage; }
set { _mymessage = value; }
}
string _param = "http://www.163.com";
public string Param
{
get
{
return _param;
}
set
{
_param = value;
}
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(_mymessage);
if (SubmitClicked != null)
// _param = "这是一个测试的文件";
SubmitClicked();
}
public void ttMessageBox()
{
MessageBox.Show("sdsdfsd");
}

#region IObjectSafety 成员
public void GetInterfacceSafyOptions(int riid, out int pdwSupportedOptions, out int pdwEnabledOptions)
{
pdwSupportedOptions = 1;
pdwEnabledOptions = 2;
}
public void SetInterfaceSafetyOptions(int riid, int dwOptionsSetMask, int dwEnabledOptions)
{
//throw new Exception("The method or operation is not imple


相关文档:

javascript 匿名函数以及闭包的特性

匿名函数
函数是JavaScript中最灵活的一种对象,这里只是讲解其匿名函数的用途。匿名函数:就是没有函数名的函数。
1、函数的定义,首先简单介绍一下函数的定义,大致可分为三种方式
第一种:这也是最常规的一种
function double( x ){
    return 2 * x;   
}
第二种:这种方法使用了Func ......

JavaScript中一点让人很不理解的地方

这个地方就是为什么它的String类型不直接提供一个trim方法呢?
为什么每次都要写这样一句话呢?
String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");}
这样有意思吗?
JavaScript中规定一个这样的方法会死啊? ......

C#中对 XML节点进行增、删、改、查

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
namespace WebApplication2
{
    /// <summary>
    /// XMLHelper XML文档操作管理器
  &nb ......

字符串中的JSON转换成JAVASCRIPT的OBJECT

// 下面代码块实现了string.parseJSON方法
(function(s){
  // This prototype has been released into the Public Domain, 2007-03-20
  // Original Authorship: Douglas Crockford
  // Originating Website: http://www.JSON.org
  // Originating URL    : http://www.JSON.o ......

107个常用Javascript语句

1.         document.write( " "); 输出语句
2.JS中的注释为//
3.传统的HTML文档顺序是:document- >html- >(head,body)
4.一个浏览器窗口中的DOM顺序是:window- >(navigator,screen,history,location,document)
5.得到表单中元素的名称和值:document.getElementB ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号