给按钮定义加速键
更多相关参考论文设计文档资源请访问
软件技术国家教学资源库建设项目
——软件开发素材之C# 源代码
一、名称
给按钮定义加速键
二、创建或搜集相关信息
搜集单位:重庆电子
工程
路基工程安全技术交底工程项目施工成本控制工程量增项单年度零星工程技术标正投影法基本原理
职业学院
搜集时间:2012-08-05
来 源:互联网
三、适用对象
学生、教师、C#及ASP.NET项目开发人员、相关技术人员等。
四、功能简介
给按钮定义加速键。
五、程序代码
程序名称:Program.cs
using System;
using System.Collections.Generic; using System.Linq;
using System.Windows.Forms;
namespace ButtonShortCut
{
static class Program
{
///
/// 应用程序的主入口点。
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
完整设计文件及源代码,资料请联系68661508索要
更多相关参考论文设计文档资源请访问
}
程序名称:MainForm.cs
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 ButtonShortCut
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void btnOK_Click(object sender, EventArgs e)
{
MessageBox.Show("点击了确定~", "提示~");
}
private void btnQuit_Click(object sender, EventArgs e)
{
MessageBox.Show("点击了退出~", "提示~");
}
}
}
六、运行结果
完整设计文件及源代码,资料请联系68661508索要
更多相关参考论文设计文档资源请访问
图54 Program.cs运行结果
完整设计文件及源代码,资料请联系68661508索要