易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

firefox+Firebug调试JavaScript、HTML和CSS

什么是Firebug
从事了数年的Web开发工作,越来越觉得现在对WEB开发有了更高的要求。要写出漂亮的HTML代码;要编写精致的CSS样式表展示每个页面模块;要调试javascript给页面增加一些更活泼的要素;要使用Ajax给用户带来更好的体验。一个优秀的WEB开发人员需要顾及更多层面,才能交出一份同样优秀的作业。为帮助广大正处于W ......

面向对象的JavaScript的表格排序问题

JavaScript表格排序有很多种方式,不过在使用面向对象的方式进行JavaScript排序时IE会有一些问题。代码如下:
<html>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>演示表格的排序功能</title>
</head>
 
 < ......

c#(asp.net)几中不同从前台页面操作后台

第一种
<%=RetInfo("DB","数据库") %>
<%=RetInfo("YX_UpFile","上传文件") %>
<%=RetfileInfo("Include/", "广告")%>
//从前台调用后台方法
//从前台调用后台的方法..并向其方法传入不同的参数!
第二种
<ItemTemplate >
<%#Ret_stat(Convert.ToInt16(Eval("YX_Stat1")), "热点")%> ......

利用Javascript向页面中插入TABLE,IE下无法正常显示

利用Javascript向页面中插入TABLE,IE下无法正常显示
关键字: table, appendchild, ie, firefox
在项目中偶然遇到一个怪异的问题,我要利用javascript动态的向一个DIV中插入一些个TABLE,Firefox可以正常显示,而在IE下,无论版本是6或7,均无法看到这个TABLE。但是,如果我直接把TABLE的HTML代码写在页面上,一切都能正 ......

javascript 日期相减

<SCRIPT LANGUAGE="JavaScript"> 
  
  var strDate1 = "2003-06-17";
  var strDate2 = "2004-09-18";        
  //var strDate1 = "2003-06-17 03:03:40.0";
  //var strDate2 = "2004-09-18 12:03:12.0" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号