C# Programming
06-23-2009, 05:30 PM
frnds,
how to move focus of one component(textbox, date picker, combo...) to other component. with ENTER key?
i tried key press with ..... code
private void txtAppfrmNo_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
MessageBox.Show("to next box");
}
}
******************************************************************
this.txtAppfrmNo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtAppfrmNo_KeyPress);
****************************************************
its not working, where is the problem???
how to move focus of one component(textbox, date picker, combo...) to other component. with ENTER key?
i tried key press with ..... code
private void txtAppfrmNo_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
MessageBox.Show("to next box");
}
}
******************************************************************
this.txtAppfrmNo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtAppfrmNo_KeyPress);
****************************************************
its not working, where is the problem???