Delay the keyboard input for specified time

  • Thread starter Thread starter Uveper
  • Start date Start date
U

Uveper

I am trying to create a textbox which would have a delayed input from
keyboard. For example when I press "A" it waits for 200 ms and only
after that time it passes the key to textbox. I tryed to do it with
ProcessCmdKey event which fires every time any key is pressed, but
there are arguments that do not contain information about the character
that should appear in textbox, but just the ASCII value of pressed key
(does not distinguish small or caps characters, not even to mention
local codepage chars). I tryed to just remember the params of
ProcessCmdKey event and manualy fire it later up, but with no success.
I also tryed to call an API SendMessage, but with no success.
Can someone please give me some pointers !

Thank You!!
 
Why can't you use KeyPress event?
It is synchronous so that you can delay and it lets you decide wheiter to
send the key to textbox or not.
 
Hi,

You can use KeyPress as Laura suggesed, just be aware that it will slow all
your app as well.
 

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

Back
Top