1. Computing

VB.NET: What Happened to Control Arrays!!! (Part 5)

From , former About.com Guide

2 of 8

First, the VB.NET Class ...

William inherits from the PictureBox control for this example. His class includes two properties and an event. One of the properties is used to index the array in the program that instantiates the class. The other is used to keep track of whether a PictureBoxClass object is "flipped" or not. "Flip" is just a change in color, but something like this could work very well in a card game program.

The event combines the Click and DoubleClick events so you get the same result for either one. But it's a great example showing how to code an event in a class.

  1. About.com
  2. Computing
  3. Visual Basic
  4. Using VB.NET
  5. Control Array VB.NET Class

©2013 About.com. All rights reserved.