日期:2014-05-17 浏览次数:21295 次
namespace Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 f = new Form2();
f.Press += MiniKeyboardHandler;
f.ShowDialog();
}
private void MiniKeyboardHandler(object sender, MiniKeyboardArgs e)
{
textBox1.Text += e.KeyCode;
}
}
}
namespace Test
{
//模拟小键盘
public partial class Form2 : Form
{
public delegate void MiniKeyboardHandler(object sender, MiniKeyboardArgs e);
public event MiniKeyboardHandler Press;
public Form2()
{