Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello. I am using Visual Basic in Visual Studios. I am trying to use the Cancel

ID: 3918457 • Letter: H

Question

Hello. I am using Visual Basic in Visual Studios.

I am trying to use the Cancel Button property on my form to stop the application from drawing my line, however when I click escape it does not seem to click the button to stop my drawing. It makes the error noise but there is no error. I have KeyPreview set to True. I also have the Cancel Button set to the button that has the code to stop the drawing. The button that does this is invisible (i.e. visible is set to False). How can I fix my Cancel Button? Or should I go about it another way?

Thank you for your time

Explanation / Answer

To designate the cancel button:

Select the form on which the button resides.

If not solved, then please explain the problem more clearly.