利用按钮的Tag属性触发其事件
来源:互联网 发布:linux piwik安装详解 编辑:程序博客网 时间:2024/04/26 14:02
把按钮的Tag属性设置0-N
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace Tag_Button{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Buttons_Click(object sender,EventArgs e) { int Flag = int.Parse(((Button)sender).Tag.ToString()); switch (Flag) { case 0: MessageBox.Show("This is the first button!"); break; case 1: MessageBox.Show("This is the second button!"); break; case 2: MessageBox.Show("This is the third button!"); break; } } }}
- 利用按钮的Tag属性触发其事件
- C#触发按钮的事件
- 用代码编写按钮以及触发其事件
- lua按钮事件的生成与触发
- winform拦截关闭按钮触发的事件
- 单击按钮触发file的click事件
- 触发隐藏按钮的onclick事件 注意事项
- 代码控制按钮点击事件的触发
- NGUI另一种按钮事件触发的方法
- 自动触发按钮的点击事件
- 回车触发按钮的click事件
- 024主动触发按钮的单击事件
- flex定时触发按钮的点击事件
- 回车触发按钮事件
- 按钮事件触发两次
- ASP中按钮触发事件
- 按钮点击触发哪些事件
- Jquery 回车触发按钮事件
- OS界面-仿网易新闻左侧抽屉式交互 续(添加新闻内容页和评论页手势)
- 黑马程序员-集合框架
- undefined reference to "sleep"
- cocos2d动画工具:-hd.plist 生成 plist
- 杭电 HDU 2084 数塔
- 利用按钮的Tag属性触发其事件
- android 读取TXT文件
- 警告: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@21eb3f -- APPARENT DEADLOCK!!
- 去除List中重复的数据
- 项目应用中JQUERY+CSS
- 偷个空,写个博客——各种沟通各种纠结
- 苹果平台上的媒体流播放技术HLS
- Dreamweaver下拉菜单全攻略
- ios 版 qq 聊天记录的导出