Originally Posted by TinyClone
doesnt matter; i want to let it fire like 40 times a sec, and KeyPress only fires on press after its released; KeyDown only fires on pressing the key down (1 time).
Well you could use the event approach and create a variable to store the state of your key. Detect when the keydown event indicates it has been pressed.
private bool ControlKeyDown = false;
private void txtSendData_KeyDown(object sender, KeyEventArgs e)
if (KeyHandled = e.KeyCode == Keys.ControlKey)
ControlKeyDown = true;
private void txtSendBox_KeyUp(object sender, KeyEventArgs e)
if (e.KeyCode == Keys.ControlKey)
ControlKeyDown = false;
Then all you'd have to do is check your ControlKeyDown variable. It will get updated in realtime by the event handlers.