Click to See Complete Forum and Search --> : how do I program a TAB ?


Col Tomb
March 16th, 2004, 09:33 PM
I wish to programmatically enter a TAB...

I'm working on a program to fill in a bank deposit slip with a couple dozen entries.

I wish to make the <ENTER> key act as a TAB.

Any ideas ?

<edit>
And how do I "swallow" the <ENTER> key to skip the 'bonk' tone that WinXP generates ?

kevin shen
March 17th, 2004, 02:00 AM
try the control's ENTER event and Convert.ToChar(9)


Kevin

Acephalus
March 17th, 2004, 09:45 AM
"Enter" event refers to the focus (ie. when the control receives focus), so it won't do. Try KeyPress/KeyDown/KeyUp... I forget which one was raised before the key is handled by the control.