narsil/Tanshu.Common.KeyboardControl/NumpadControl.cs

90 lines
1.9 KiB
C#
Raw Normal View History

2011-01-06 07:17:00 +00:00
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Tanshu.Common.KeyboardControl
{
public partial class NumpadControl : UserControl
{
public NumpadControl()
{
InitializeComponent();
}
private void btn1_Click(object sender, EventArgs e)
{
SendKeys.Send("1");
}
private void btn2_Click(object sender, EventArgs e)
{
SendKeys.Send("2");
}
private void btn3_Click(object sender, EventArgs e)
{
SendKeys.Send("3");
}
private void btn4_Click(object sender, EventArgs e)
{
SendKeys.Send("4");
}
private void btn5_Click(object sender, EventArgs e)
{
SendKeys.Send("5");
}
private void btn6_Click(object sender, EventArgs e)
{
SendKeys.Send("6");
}
private void btn7_Click(object sender, EventArgs e)
{
SendKeys.Send("7");
}
private void btn8_Click(object sender, EventArgs e)
{
SendKeys.Send("8");
}
private void btn9_Click(object sender, EventArgs e)
{
SendKeys.Send("9");
}
private void btn0_Click(object sender, EventArgs e)
{
SendKeys.Send("0");
}
private void btnDot_Click(object sender, EventArgs e)
{
SendKeys.Send(".");
}
private void btnOk_Click(object sender, EventArgs e)
{
SendKeys.Send("{ENTER}");
}
private void btnDel_Click(object sender, EventArgs e)
{
SendKeys.Send("{BACKSPACE}");
}
private void btnEsc_Click(object sender, EventArgs e)
{
SendKeys.Send("{ESC}");
}
}
}