By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,781 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,781 IT Pros & Developers. It's quick & easy.

Delay the keyboard input for specified time

P: n/a
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!!

Apr 5 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

"Uveper" <ja***********@leoss.si> ha scritto nel messaggio
news:11**********************@i39g2000cwa.googlegr oups.com...
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!!

Apr 5 '06 #2

P: n/a
Hi,

You can use KeyPress as Laura suggesed, just be aware that it will slow all
your app as well.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Uveper" <ja***********@leoss.si> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
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!!

Apr 5 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.