摘要:
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) ... 阅读全文
摘要:
/// <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... 阅读全文
摘要:
方法一: 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... 阅读全文
该文被密码保护。 阅读全文
该文被密码保护。 阅读全文