Can someone point me to the right direction? I’m trying to get a loop to trigger while the form button is depressed.
//pseudocode While (button1 is pressed) value1 += 1 And then stop looping when the button is released
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To avoid using threads you can add a
Timercomponent on your form/control and try enabling it on mouse down and disable it on mouse up. Then put the code you would normally put inside the loop in theTimer_Tick event.