Chinaunix首页 | 论坛 | 博客
  • 博客访问: 225435
  • 博文数量: 45
  • 博客积分: 3010
  • 博客等级: 中校
  • 技术积分: 915
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-18 16:03
文章分类

全部博文(45)

文章存档

2011年(1)

2008年(44)

我的朋友

分类:

2008-08-18 11:45:55

比如:获取Ctrl+C键

private void windsorweng_KeyDown(object sender, KeyEventArgs e)
    {
        //按下Control+C

        if (e.KeyCode==Keys.C&&e.Control)
        {
              
        }
    }

TextBox键盘事件ReadOnly = true 然后键盘Delete和BackSpace键删除内容:

 

    private void textBox1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if(e.KeyCode == Keys.Delete || e.KeyCode == Keys.Back)
            {
                textBox1.Clear();
            }
        }

阅读(2560) | 评论(3) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-07-16 19:43:21

东西不在少,关键在经典,言简意赅,说到点子上,否则再多都是废话.

chinaunix网友2009-04-20 19:45:18

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Collections; namespace calc { public partial class Calc : Form { private string[] arrstring = new string[3]; private int flag = 1; private string jisuan(string a,string ysf,string c) { double result = 0; switch (ysf.Trim()) {

chinaunix网友2008-09-08 18:31:03

不错,就是内容太少太简单了