Knowledge Base

SAMPLE: LED.EXE: Light Emitting Diode Character Display Sample

Article ID: 175537

Article Last Modified on 1/11/2001


APPLIES TO


This article was previously published under Q175537

SUMMARY

LED.EXE is a Visual Basic control that emulates a light-emitting diode display, such as those found in digital clocks and meters. The user can either assign a Value to the LED, which will be displayed, or the user can actually assign a ValueMask to the LED, which allows for turning on individual segments of the LED. You can turn on any of the seven individual segments to allow you to display letters or numbers.

The project for this control can be downloaded from the Visual Basic Owner's site at
http://premium.microsoft.com/download/vbasic/led.exe. Only registered users of Visual Basic can access this site.

MORE INFORMATION

The following is an excerpt from the readme.txt shipped with the sample that covers some of the technical details of this sample.

Definitions

The following properties are available with the LED control:

LED Display

This is a diagram of the "mask values" for the LED:
          ---1---
         |       |
         |       |
         8       16
         |       |
         |       |
          ---2---
         |       |
         |       |
         32      64
         |       |
         |       |
          ---4---
				
To create a "unique" display, just add up the numbers for the segments that you want turned on, set ValueIsMask to True, and assign the value to Value. A few examples would be:
      A      123
      C       45
      E       47
      F       43
      H      122
      -        2
      _        4
				

Additional query words: led

Keywords: kbhowto kbprogramming kbfile kbsample KB175537