|Site sponsored by virtual-keyboard.com||
Showing the state of the "...Lock" keys
This tutorial focuses on the creation of keys that monitor and show the state of Caps Lock, Num Lock and Scroll Lock.
The following procedure will be demonstrated:
To begin, start the MountFocus Keyboard Designer and select File | New. This will open a new keyboard file. The property editor will show the properties of the new keyboard.
Place 3 label objects on the keyboard in a vertical row, and directly under each label, an indicator object. The default size of indicator objects is 20 x 20, so we'll leave them that size.
Change the top label to read Caps Lock, the second to read Num Lock and the third to read Scroll Lock.
Now let's work on the Caps Lock indicator.
First change the MonitorIndicator property to CapsLock. Next Open the OffCaption editor by clicking on the ellipsis button next to the property. Click on the Image tool and place an image on the indicator sized to 20 x 20.
Click on the ellipsis button next to the Image property to load an image. For this example we'll use the ind_off.bmp. Center the image on the indicator and click OK.
Next we'll set the OnCaption state in the same way as above, but this time use the image ind_on.bmp.
You can test to see that these images will change by right clicking on the indicator and choosing Show on caption or Show off caption from the pop up menu.
Now follow the same procedure for the Num Lock and Scroll Lock indicators.
You should have a keyboard that looks something like this:
Go ahead and test it by running the keyboard and pressing the Caps Lock, Num Lock and Scroll Lock keys on your physical keyboard.
If you would like to download the keyboard file that was created in this tutorial, click here.
Add or view comments (0) to this article. Click here for printable version.
|© 2002 - 2009 MountFocus Information Systems|