OCX Controls & software technologies

 


Precision Bitmap LED


Overview


Purpose

Precision Bitmap LED is a powerful OCX control for your applications which can be used to graphically represent the on/off state of a system, or the value of a binary variable. A variety of parameters can be customized.

Optimization

Precision Bitmap LED was written entirely in C++ and is composed of strongly optimized code, the distributed OCX file only contains the essential code needed to perform the required features. There are no memory leaks, all the allocated memory and graphic resources are gracefully released. The only required libraries are the MFC and MSVCRT DLLs that are shipped with every version of Microsoft Windows. You do not need any additional libraries.

Small binary size

There is no useless code into the executable: it is only 50k in size ! This means that it is very fastly loaded into your application and it does not significantly increase your final application size.

High customisability

Precision Bitmap LED has 7 parameters you can freely set, in order to control its graphic appearance and its functionality.

Any special requirement ?

If you are developing an application and found Precision Bitmap LED nearly perfect for you needs except for small details, please feel free to contact us: let's talk about it !

Documentation

All the documentation you may need on Precision Bitmap LED is on line !


Quick start


You can start using Precision Bitmap LED incredibly fast: the control default factory parameters are already correct for a basic use, you have only got to : Now you can take a more accurate look at the properties to fully exploit the power of Precision Bitmap LED.


Properties


BackColor
Domain: any color
Default value: depends on your development environment, usually 0x00C0C0C0 (grey),
Meaning: this is the color used to paint the unused space of the control bounding box.
BlackWhenOff
Domain: True, False
Default value: False
Meaning: if you set this property to True, the LED is really black when it is off (its State is set to False); otherwise, if you set this to False, even when the LED is off, its color will be slightly visible. This property has no effect when the LED is on (its State is set to True).
ValueExample
True
False
Blinking
Domain: True, False
Default value: False
Meaning: when you set this property to True, the LED will:
  • remain black, if its State is set to False; otherwise
  • start blinking, using the value of the BlinkingTimeMillisec property as a delay between the lit and the non-lit state;
As you can see, setting this property has no visible effects when the LED is off; furthermore, the value assumed by the State property will not be affected. Due to OCX technology reason, the effects of this property are visible only at run-time, therefore do not worry if, in design-time, you do not see the LED blinking.
BlinkingTimeMillisec
Domain: any integer number (small)
Default value: 300
Meaning: this is the delay of the transition between the lit and non-lit state (and the same delay is used for the opposite transition) expressed in milliseconds. This property is actually used only if the State and the Blinkingproperties are both set to True.
Color
Domain: 0,1,2
Default value: 2
Meaning: : this property is used to select the color of the LED. Since the LED is drawn using a series of sets of predefined bitmaps, this property directly selects a set of bitmaps instead of another.
ValueLED colorExample
0 
1 
2 
State
Domain: True, False
Default value: False
Meaning: this property simply represents the on/off state of the control. Set this property to False if you want to turn off the LED, set it to True if you want to turn if on or enable blinking.
Style
Domain: 0, 1, 2, 3, 4, 5
Default value: 0
Meaning: this value represent the style you choose, from this predefined series of bitmap sets:
ValueLED shapeShadow styleExample
0round sharp
1round soft
2square sharp
3square soft
4diamondsharp
5diamondsoft


Methods


Toggle
Arguments: none
Purpose: if State was True before calling this method, then it will be set to False and conversely if it was False, it is set to True. The value of the Blinking property remains unchanged.
SetLicense(long LicenseNumber)
Parameters: LicenseNumber, a long integer number which represent your license number.
Return value: a boolean value that represents the result of the authentication.
Meaning: this method is used to activate the control. You should call this method before calling any other method, passing the license number you obtained at purchase time as LicenseNumber parameter, otherwise the control will not draw itself on the screen.