How do you delete an unwanted event-handling method?
What will be an ideal response?
When you are working in the Form Designer in the IDE, it is easy to inadvertently double-click a control and automatically create an event-handling method that you do not want. For example, you might double-click a Label named label1 by mistake and generate a method named label1_Click(). You can leave the automatically created method empty so that no actions result, but in a professional program you typically would not include empty methods. Such empty methods that never execute are known as orphaned methods. You should not just delete an orphaned method because, behind the scenes, other code might have been created that refers to the method; if so, the program will not compile. Instead of deleting the method code, you should click the control with the unwanted method so it appears in the Properties
window, then click the Events button, which looks like a lightning bolt. Select the event you want to eliminate, and delete the name of the method. This eliminates all the references to the method, and your program can again run successfully.
You might also like to view...
A(n) ________ device is a component, such as a keyboard, that connects to the computer
Fill in the blank(s) with correct word
The Remove Background tool in PowerPoint 2010 allows only a rectangle-shaped picture
Indicate whether the statement is true or false
The area of the screen that displays the contents of a website is the ________
A) homepage B) pop-up C) browsing window D) browsing history
Images that will be printed need a resolution of at least 300 ppi (pixels per inch) or dpi (dots per inch) but images viewed only on the web need a minimum resolution of _______________ ppi.
Fill in the blank(s) with the appropriate word(s).