Exercise: Design a simple form to display a star sign

This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

The answer to the exercise will be included and explained if you attend the Wise Owl courses listed below!

Category ==> Visual C Sharp 2010  (65 exercises)
Topic ==> Creating forms  (2 exercises)
Level ==> Relatively easy
Courses ==> WinForms using Visual C#  /  Introduction to Visual C#

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

The aim of this exercise is to create a simple for to allow someone to type in the details of their star sign.  First create a form called frmStarSign as follows:

Visual C Sharp 2010 exercise - Creating forms (image 1)

This form also includes ToolTips, as shown

Customise your form so that:

  • Pressing ENTER automatically chooses the SHOW button
  • Pressing ESC automatically chooses the CANCEL button
  • The TAB key takes you through the controls in the correct order

Write code so that:

  • when a user clicks on Cancel this closes down the form
  • when a user clicks on the Show button this displays what you have typed in

Your final message box could look something like this:

Visual C Sharp 2010 exercise - Creating forms (image 2)

Guess the star sign of the author of this exercise ...

When everything is working, close your form down!

This page has 0 threads Add post