Create a project named guessanumber with a form that


Question 1. Locate an animated .tif file on the Web. Create a project named Animated with a Form that contains a PictureBox. Display three different messages on a Label-one when the user's mouse is over the PictureBox, one when the mouse is not over the PictureBox, and one when the user clicks the PictureBox.

Question 2. Emma's Custom Embroidery sells shirts with detailed embroidered images. Emma allows users to select the color for a shirt, but she allows only specific embroidery designs with each shirt color. Create a project named EmmasEmbroidery that allows a user to choose one of four shirt colors from a ListBox-white, black, red, or blue. When the user selects a shirt color, the program should display a second ListBox that contains the following embroidery design choices:

- White shirt-peacock, palm tree, or rose
- Black shirt-race car, star, or moon
- Red shirt-palm tree or moon
- Blue shirt-peacock or moon

After the user selects an embroidery design, the program should display a congratulatory message on a Label indicating that the choice is a good one, and the design ListBox also becomes invisible. If the user makes a new selection from the shirt color ListBox, the congratulatory message is invisible until the user selects a complementary design.

Hint: You can remove the entire contents of a ListBox using the Items.Clear() method, as in this.listBox1.Items.Clear();.

Question 3. Create a project named GuessANumber with a Form that contains a guessing game with five RadioButtons numbered 1 through 5. Randomly choose one of the RadioButtons as the winning button. When the user clicks a RadioButton, display a message indicating whether the user is right.

Add a Label to the Form that provides a hint. When the user's mouse hovers over the label, notify the user of one RadioButton that is incorrect. After the user makes a selection, disable all the RadioButtons.

Question 4. Create a project named PickLarger with a Form that contains two randomly generated arrays, each containing 100 numbers. Include two Buttons labeled "1" and "2". Starting with position 0 in each array, ask the user to guess which of the two arrays contains the higher number and to click one of the two buttons to indicate the guess. After each button click, the program displays the values of the two compared numbers, as well as running counts of the number of correct and incorrect guesses. After the user makes a guess, disable the Buttons while the user views the results. After clicking a Next Button, the user can make another guess using the next two array values. If the user makes more than 100 guesses, the program should reset the array subscript to 0 so the comparisons start over, but continue to keep a running score.

Answer the following questions-

1. The EventArgs class contains a static field named __________.
a. Empty
b. Text
c. Location
d. Source

2. When creating events, you can use a predefined delegate type named __________ that is automatically provided by the .NET Framework.
a. EventArgs
b. EventHandler
c. EventType
d. Event

3. Which of the following is not a predefined Control event?
a. MouseEnter
b. Click
c. Destroy
d. TextChanged

4. A single Control can raise __________ event(s).
a. one
b. two
c. five
d. any number of

5. When you create Forms with Controls that raise events, an advantage to creating the code by hand over using the Visual Studio IDE is __________.
a. you are less likely to make typing errors
b. you save a lot of repetitious typing
c. you are less likely to forget to set a property
d. you gain a clearer understanding of the C# language

6. When a Form contains three Controls and one has focus, you can raise an event by __________.
a. clicking any Control
b. pressing Enter
c. either of these
d. none of these

7. The TabStop property of a Control is a(n) __________.
a. integer value indicating the tab order
b. Boolean value indicating whether the Control has a position in the tab sequence
c. string value indicating the name of the method executed when the Control raises an event
d. delegate name indicating the event raised when the user tabs to the Control

8. The TabIndex property of a Control is a(n) __________.
a. integer value indicating the tab order
b. Boolean value indicating whether the Control has a position in the tab sequence
c. string value indicating the name of the method executed when the Control raises an event
d. delegate name indicating the event raised when the user tabs to the Control

9. The Control that causes an event is the __________ argument to an event method.
a. first
b. second
c. third
d. fourth

10. Which of the following is true?
a. A single event can be generated from multiple Controls.
b. Multiple events can be generated from a single Control.
c. Both of the above are true.
d. None of the above are true.
(Farrell 668-669)

Farrell, Joyce. Microsoft Visual C# 2012: An Introduction to Object-Oriented Programming, 5th Edition. Cengage Learning, 20130304. VitalBook file.

Solution Preview :

Prepared by a verified Expert
Programming Languages: Create a project named guessanumber with a form that
Reference No:- TGS01695017

Now Priced at $50 (50% Discount)

Recommended (95%)

Rated (4.7/5)