Learning Objectives
In this module you will learn how to
- create and work with extended controls
- generate new controls dynamically and be able to interact with them
- work with .NET arrays
Module Description:
Summary
In this module you will be
developing a simple program to dynamically generate and discard square boxes on the screen.
User Interface and Interaction
The application will behave like
ModuleDynamicControls.zip
In particular
- The U.I. should include a button with which the user can create a new box,
and display it on screen.
- The boxes are automatically numbered in the order in which they are created
and displayed in an orderly fashion.
-
The U.I. should also include facilities to delete one of the boxes by specifying
its number. The point of this is to access the box indirectly by its number rather
than directly by clicking on it.
-
When new boxes are created after boxes have been deleted, the positions left empty
by the deleted boxes should be filled in order in a visible way. E.g. in the example,
delete one a few of the middle boxes and then add more boxes.
-
There should be no limit to the number of boxes that can be created and deleted.
Implementation Details
- The boxes are extended Button controls called "Box"
which simply contain the number representing their position.
- The boxes should be dynamically generated at run-time instead of
statically at compile-time.
- The boxes should be kept in an array.
Handouts
In the
Handouts directory
you will find:
References
References for this module are in the
User Defined Controls Reference
and in the Microsoft reference on
Arrays in Visual Basic
Explanations of all VB features needed for all the modules can be found at the
General Assignment References page
|