Microsoft Visual Basic
Constants, arrays and enumerations exercise
Average difficulty

This Microsoft Visual Basic CONSTANTS, ARRAYS AND ENUMERATIONS exercise is provided to allow potential course delegates to assess their suitability for the Wise Owl VISUAL BASIC 2005 WINDOWS FORMS course only, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Exercise: Using resources to populate picture/title

A full answer to this exercise is provided as part of the training course!

1) Download the files needed to start this exercise: exercise-648.zip (and click here if you experience any problems unzipping this file after downloading it).
2) Create a new form called frmResourceUse with one label at the top and one PictureBox control beneath it:
Exercise screen-shot 1237 Initially neither the label nor the picture is set
3) Use the images in the folder above to create 3 resources:
  • A string resource giving your name
  • An image resource giving a picture of you
  • An image resource giving a picture of your ideal partner or friend
4) Attach code to the form's load event to set:
  • the text of the label to be the name held in your project's resources
  • the image on your picturebox to be one of the two stored in your project's resources
5) Test that this works!
Exercise screen-shot 1238 An example of what you might see when you load your form
6) Close down any open forms.

Thank you for showing an interest in this Visual Basic 2005 Windows Forms training course! As mentioned above, full answers to this and other exercises are provided on the course. On all Wise Owl scheduled courses delegates can take away these model answers (together with their own efforts!) on a free USB stick.

All content � Wise Owl Business Solutions Ltd 2007.  All rights reserved.  Design by Branches.