Word-Complete problem with custom text-box

K

Kishore

Hi,
I have a custom text box that that has some additional
functionality. One the features are the input focus is transferred to
the next control when Enter or Tab key is pressed. The control scans
each key stroke on Key Up event and transfers the focus to the next
control when the key stroke is Enter or Tab.
This works fine when the user inputs the data. But when the user
uses the Word Complete feature, the KeyCode sent to the program is of
Enter Key. This causes my program to lose the focus of the text box.
Is there a way to distinguish between a user input and word complete
input? Is there any work around for this problem?
Any help is really appreciated.
Thank you...
Kishore.
 
D

Damon Payne

Did you write this TextBox? If so, sounds like a design problem. If
not, and this is a 3rd party component using keybd_event to send, could
you check the sender?
 
K

Kishore

Hi Mr.Payne,
I have the source for this text-box. The text box was written in C#.
How can I check the sender?

My function:
void TextBox_KeyUp(object sender, KeyEventArgs e)

The sender in this case is the text-box. I was checking the key code
using e.KeyCode

Thanks...
Kishore.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top