Page 1
Page 2
This is the second part to add to my first tutorial
(eVB Currency Converter)
due to the increasing number of requests Ive seen for a simple keypad.
In this tutorial we will be adding a numeric keypad to make entering of
the currency a little easier than using the conventional keyboard (as
we are only interested in entering numbers).
Tutorial Goal
This tutorial is aimed with the beginner in mind to
give a better understanding on how the following procedures work.
- Select Case statement
- ActiveControl property
- Creating a re-usable function
- Creative use for the Tag and Caption properties
Please Note: You will have already completed the eVB
Currency Converter Part I before attempting this tutorial, as we be
adding additional code to the original eVB Currency Converter Part I.
Lets Begin
To begin, lets load our form from our original eVB
Currency Converter application:
Adding the controls (keypad buttons) to
the Form
This is where will design the keypad by using 13 command
buttons. Ten of which command buttons will be used for our number entry.
For example
- Button 1 will be used for a 1 input
- Button 2 will be used for a 2 input
- Button 3 will be used for a 3 input
-
-
- Button 10 will be used for a 0 input
The other three buttons will be as follows:
- Button 11 will be used to as a decimal point
.
- Button 12 will be used to clear C the
text box.
- Button 13 will be used to Swap Country
the countries from one combo box to another.
Start with placing the first command button on the
form and assign it the same properties as indicated in the pictures below.


Adding the controls (keypad buttons) to the
form (cont:)
Keep adding all of the command buttons until your
form looks similar to the ones pictured below. Lastly, add a large rectangular
shape to make the Swap Country button.
Optional: For the keypad buttons pictured below,
l have used font Size 8 and selected the Bold setting. This will ensure
the keypad numbers will stand out.


Next Page