Archive

Archive for January, 2012

Di chuyển con trỏ đến cuối trên DataGridViewTextBoxCell

private void dgvData_CellEnter(object sender, DataGridViewCellEventArgs e)
{
DataGridView dgv = (DataGridView)sender;
DataGridViewTextBoxCell textBoxCell = dgv.CurrentCell as DataGridViewTextBoxCell;
if (textBoxCell != null)
{
dgv.BeginEdit(false);
}
}

Categories: C#

Code to make keyboard

Show Recent Messages (F3)

Huynh Thanh Du: const int WS_EX_NOACTIVATE = 0x08000000;

protected override CreateParams CreateParams
{
get
{
CreateParams param = base.CreateParams;
param.ExStyle |= WS_EX_NOACTIVATE;
return param;
}
}

private void button1_Click(object sender, EventArgs e)
{
SendKeys.Send(“a”);
}

Categories: C#