Visual C# | Creating forms 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.

Software ==> Visual C#  (79 exercises)
Version ==> Any version of C#
Topic ==> Creating forms  (4 exercises)
Level ==> Relatively easy
Subject ==> C# training

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!

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only.
This page has 0 threads Add post