Exam 13: Handling Events
Exam 1: A First Program Using C42 Questions
Exam 2: Using Data42 Questions
Exam 3: Using Gui Objects and the Visual Studio Ide42 Questions
Exam 4: Making Decisions42 Questions
Exam 5: Looping42 Questions
Exam 6: Using Arrays42 Questions
Exam 7: Using Methods42 Questions
Exam 8: Advanced Method Concepts42 Questions
Exam 9: Using Classes and Objects42 Questions
Exam 10: Introduction to Inheritance42 Questions
Exam 11: Exception Handling42 Questions
Exam 12: Using Controls42 Questions
Exam 13: Handling Events41 Questions
Exam 14: Files and Streams42 Questions
Select questions type
Given a GUI Control , what objects and delegates are provided to handle mouse events such as clicking, pointing, and dragging?
Free
(Essay)
4.8/5
(29)
Correct Answer:
Mouse events include all the actions a user takes with a mouse, including clicking, pointing, and dragging. Mouse events can be handled for any Control through an object of the class MouseEventArgs . The delegate used to create mouse event handlers is MouseEventHandler . Every mouse event-handling method must have two parameters: an object representing the sender, and an object representing the event. Depending on the event, the type of the second parameter is EventArgs or MouseEventArgs .
The code generated in Design mode in the IDE is not meant to be altered by typing. You should modify Control properties through the Properties window in the IDE.
Free
(True/False)
4.7/5
(37)
Correct Answer:
True
When an event occurs, any delegate that a client has given or passed to the event is invoked.
Free
(True/False)
4.9/5
(42)
Correct Answer:
True
Assume you declare three delegates named delegate1 , delegate2 , and delegate3 . You then assign a reference to method M1() to delegate1 , and a reference to method M2() to delegate2 . How do you make delegate3 into a composed delegate that executes both M1() and M2() ? What are the rules concerning return type and parameter list for composed delegates?
(Essay)
4.8/5
(45)
The first parameter of an event-handler method is an object named ____________________; it is a reference to the object that generated the event.
(Short Answer)
4.8/5
(39)
When you define your own event-handler delegate, what arguments are required? Provide an example of a delegate declaration.
(Essay)
4.9/5
(34)
Match each item with a statement below:
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(49)
When you open the ____ file in an IDE, you can examine all the code generated by the Windows Form Designer for an application that creates a Form .
(Multiple Choice)
4.8/5
(39)
Given the delegate declaration: delegate void GreetingDelegate(string s);
What do you know about any method that is represented by this delegate? In general, what can you tell about a method if you know it is encapsulated by a particular delegate?
(Essay)
5.0/5
(37)
The ____ class static field named Empty represents an event that contains no event data.
(Multiple Choice)
4.7/5
(30)
The ____ event occurs when the mouse cursor leaves the Control 's boundaries.
(Multiple Choice)
4.9/5
(33)
A(n) ____ provides a way for the clients of a class to dictate methods that should execute when an event occurs.
(Multiple Choice)
4.9/5
(33)
Showing 1 - 20 of 41
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)