Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On Key Label on muliplication sign from the numeric keypad

Status
Not open for further replies.

Harry_Clipper

Programmer
Dec 2, 2020
12
DE
Hallo All,
I run into a problem with on key label.

I wrote a calculator with special function for my programm.
All works fine but the on key label "x" (for the multiplication key on the numeric keypad) does not work.
Per inkey() it would be 42 when press this key in a text control.
Here is a part of the on key label assignetments:
ON KEY LABEL "7" mycalc.container1.commandgroup1.command7.Click
ON KEY LABEL "8" mycalc.container1.commandgroup1.command8.Click
ON KEY LABEL "9" mycalc.container1.commandgroup1.command9.Click
ON KEY LABEL "+" mycalc.container1.commandgroup1.command15.Click
ON KEY LABEL "-" mycalc.container1.commandgroup1.command16.Click
ON KEY LABEL "x" mycalc.container1.commandgroup1.command17.Click &&This does not work in the numeric keypad, but for the normal key
ON KEY LABEL "/" mycalc.container1.commandgroup1.command18.Click
ON KEY LABEL "." mycalc.container1.commandgroup1.command14.Click
ON KEY LABEL "," mycalc.container1.commandgroup1.command14.Click

I can use the numeric keypad with all numbers and all calculation signs (+-/) but not x.

I Just found the solution by trying to type in the "x" on the numeric keypad: it gives a "*"
So I changed the on key label to : ON KEY LABEL "*" mycalc.container1.commandgroup1.command17.Click and it works.

So for all who may have the same problem.

Harald
 
Thanks for posting this. But, I have to say that I would have thought it was obvious. The key in question clearly has an asterisk printed on the key cap, and it is mapped to the normal asterisk character. It's true that in arithmetic notation you use X for multiplication rather than the asterisk, but that has nothing to do with the keyboard.

I'm sorry if this sounds negative. Don't let me discourage you from posting any other tips you come across.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Well, your keyboard might have an x label, so Mike might be wrong in that aspect, but in short open up notpad, press the key and then copy& paste that into the ON KEY LABEL, I bet it will be:

Code:
ON KEY LABEL "*" mycalc.container1.commandgroup1.command17.Click &&This does not work in the numeric keypad, but for the normal key

Chriss
 
Hallo Mike,
Hello Chriss,

yes, it is a shame that I posted this (but I had not an "*" on it.)
I typed all my question in and accidently pressed that key and "*" came up. (Which was the solution)

I could have (or should) deleted my message and all would be fine.

But probably someone (german) will have the same problem in the future.

So, sorry for my message and thnx for your responds.

Harald
 
Harald,

No, there is no need for you to apologise for posting the message. As you say, it is quite possible that someone else might have the same problem in the future. If so, they will be glad to see your solution.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top