日進経験

1. 通过KeyPress 事件保证TextBox输入值都为数字。

this.testBox.KeyPress+=delegate(object sender , KeyPressEventArgs e)

{  if(e.KeyChar!=8  &&  !Char.IsDigit(e.KeyChar))  e.Handled=true;}  //8对应回格

2. 跳转页面

var newPage=new FormNewPage();

newPage.Owner=this;

this.Hide();

newPage.Show();

posted @ 2014-08-08 15:32  Aeolia  阅读(99)  评论(0编辑  收藏  举报