设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 软件教学 >> 编程开发 >> Visual C#事件与接口编程实例
精品推荐
编程开发点击TOP10
·Java进阶:JNI使用技巧点滴
·专家手把手教你安装MYSQL数据库
·e书工场--制造电子书全攻略
·删除流氓的SQL Server2005
·我的第一个VB程序--“跟我来学VB神童教程”
·Authorware自制拼图游戏
·使用Quick CHM软件轻松编译CHM格式的文件
·DIY自己常用的软件eXeScope
·用Authorware制作自检测在线答题系统
·精细讲述SQL Server数据库备份多种方法
软件教学点击TOP10
·自己动手制作USB启动盘快速简单
·学用金山游侠修改游戏
·几百个软件注册机
·常用软件序列号
·用eBook Edit 自己动手制作exe型电子书
·应用软件注册码大全(最新整理) 1
·Windows Media Player同步歌词秀全攻略
·五分钟玩转电脑迷共享空间
·冰点还原(DeepFreeze)使用帮助
·液晶显示器测试小工具--Monitors Matter CheckScreen
精选专题

Visual C#事件与接口编程实例

作者: 来源:网络文章 时间:2005-12-13 14:51:25

Visual C#事件与接口编程实例(2)
代码如下:


using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace Events_Interfaces
{
public delegate void dele();//声明代表 delegate 关键字通知编译器 dele 是一个委托类型
public interface IEvents //定义接口IEvents,包含方法FireEvent事件event1
{
event dele event1;
void FireEvent();
}
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label3;

private System.ComponentModel.Container components =null;

public Form1()
{
InitializeComponent();
}

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code

private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.SuspendLayout();

this.textBox1.Location = new System.Drawing.Point(8, 80);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(56,23);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "";
this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Key_Press);

共5页 9 7 [1] [2] [3] [4] [58 :>

Visual C#事件与接口编程实例 相关文章:
Visual C#事件与接口编程实例 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com