i am sorta new to C# programming and i was wondering how to make it so when i press F1 it will use sendkeys/or type something in less than a second! (instant!)
Or you could add a KeyPressed/Down/Up event to the object that should capture the F1, and use the event arguments to check what was pressed.
For example:
Code:
private void yourObject_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F1)
{
// do stuff
}
}
The more appropriated event would be KeyPressed I guess, but the eventArgs don't have a KeyCode, only KeyChar, and you can't use Keys.F1 to compare. Perhaps a simple cast would do the trick, haven't tested. Anyway, you get the general idea... =)
Bookmarks