I make my sample form with textboxes on it, and buttons as a control to add, edit, save, undo, delete & close form, just to study the behavior of this controls, setting the tab order too. But when i compile my form and run it, the cursor sticks at the first textbox field when I press the enter key, not if I use the tab key or mouse, Do we have to make a code for every textfield just to move to another textbox or other control
thank you

To move from one textbox field to another
Pyush Kumar
Whew... Didn't catch that... THanks for correcting it though...
cheers,
Paul June A. Domag
Yozz
Sowbhagya
private void keypressHandler(object sender, KeyPressEventArgs e) {
if (e.KeyChar == Keys.Enter) {
SendKeys.SendWait("{TAB}");
}
}
Regards,
Saurabh Nandu
www.MasterCSharp.com
www.AksTech.com
Shrikant24227
Mauro Inzerillo
Yup, your quite right there. You must create a routine that sends a focus to other controls when you press the enter key. To do this easier, you could create an event that handles all of the Keypress events of your controls and just use sendkeys.sendwait("{TAB}"); to emulate the enter key as a tab key...
private void keypressHandler(object sender, KeyPressEventArgs e) {
if (e.KeyChar = Keys.Enter) {
SendKeys.SendWait("{TAB}");
}
}
cheers,
Paul June A. Domag
Jim Webb