摘要: private void dgvEmployee_MouseDown(object sender, MouseEventArgs e) { DataGridView.HitTestInfo rows = this.dgvEmployee.HitTest(e.X, e.Y); if (e.Button == MouseButtons.Right) { if (rows.RowIndex > -1 && rows.ColumnIndex > -1) ... 阅读全文
posted @ 2013-06-13 14:47 双魂人生 阅读(286) 评论(0) 推荐(0) 编辑
摘要: /// <summary>为 DataGridView 添加行号。</summary> public static void ShowRows_DataGridView_RowPostPaint(DataGridView dgv, object sender, DataGridViewRowPostPaintEventArgs e) { Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, dgv.RowHeadersWidth... 阅读全文
posted @ 2013-06-13 14:43 双魂人生 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 方法一: private void txtEmployCode_KeyPress(object sender, KeyPressEventArgs e) { e.Handled = true; if (e.KeyChar >= '0' && e.KeyChar <= '9') { e.Handled = false; } }方法二: public static void NumberAccpter(object sender, Ke... 阅读全文
posted @ 2013-06-13 14:40 双魂人生 阅读(2337) 评论(0) 推荐(1) 编辑
该文被密码保护。 阅读全文
posted @ 2013-06-13 14:35 双魂人生 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2013-06-13 12:19 双魂人生 阅读(1) 评论(0) 推荐(0) 编辑