Thanks Peter, I’ve tweaked the code to deal with ALT keyins; however I had
to change the +/- sign to a – sign to use the ALT form.
I’ve also added a reset and return0 button, as well as adding a statictext
item at the top to allow a note from the user to be displayed.
To get round the problem of underbars added by pressing the ALT key making
some of the buttons difficult to read; especially the . and – buttons, I have
added a full set of numeric keys and ‘. < and –’ as hidden keys below
the equivalent (no &s) keypad keys. There are still odd problems with the
ALT format but the keys are far more legible.
Tony
'
' Code to create and manage a data input dialog. Both
mouse click and ALT+ key is supported.
' It is restricted to: Numerals
0-9
'
Decimal point "."
'
Minus sign "-" is used to change sign
'
Less Than "<" is used to delete the last character
'
' The dialog routine is declared as:
' declare function numeric_keypad(byval h as string) as
float 'h is string such as "X Distance"
' The note string is shown as a static text at the top of
the keypad.
' The current input value is shown as a statictext
control
' The return value is converted to float format.
' Users can use the ALT Key with the keyboard or click on
characters
' It is supported by sub keyin
' It needs a module wide string t_string that is used in
the dialog and support code routines.
' (dim t_string as string ' t_string is used to store
data that is common to all the modules.)
'