Hello, I have been working in a program the last 30 minutes, and I can't seem to successfully make the program press a key or mouse button.
I need the program to execute the events when a key is pressed, for example, When I press F1, start pressing letter "Q" without stopping until the same key is pressed again.
EDIT 1:
Please help me fill out the blanks inside the curly braces.
EDIT 2: Program has GUI...
Regards,
Alan Alvarez
I need the program to execute the events when a key is pressed, for example, When I press F1, start pressing letter "Q" without stopping until the same key is pressed again.
EDIT 1:
PHP:
private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.F1)
{
//Event to repeatedly press letter Q
}
else
{
// Do nothing
}
}
Please help me fill out the blanks inside the curly braces.
EDIT 2: Program has GUI...
Regards,
Alan Alvarez
Last edited:
(Hint: Left Left Left Right Down Left...)
