LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

numblock input, how to change comma to point

I want to enter float numerics to a numeric control by using the numblock of
the keyboard. How can I change the comma-key of the numblock to react like a
point-key (change "," to ".") ?
0 Kudos
Message 1 of 5
(4,100 Views)
Norbert

I'm not sure what you mean by 'numblock', though there are two ways I can think of to change . to ,. The first way is to change the regional settings in Windows. Do this by going into Window's Control Panel then to Regional Settings, goto the numbers tab. There it will give you the option to change . to ,.

The other way to change between the two is to convert the number into a string. Then search the string for the character and replace it with the other one.

Brian
0 Kudos
Message 2 of 5
(4,100 Views)
what I mean by 'numblock' are the num keys at the right side of the
keyboard. And I'm looking for a possibility independent from the regional
settings to always change the ','-key into a'.'-key. I know that I can use a
string instaed of a numeric input and after EVENT_COMMIT change the ',' into
a '.'. But I thought that there must be a possibility to do it right away
when ever the key is pressed.

Norbert



"bman" schrieb im Newsbeitrag
news:506500000005000000CA4A0000-1004225886000@exchange.ni.com...
> Norbert
>
> I'm not sure what you mean by 'numblock', though there are two ways I
> can think of to change . to ,. The first way is to change the
> regional settings in Windows. Do this by going into Window's Control
> Panel then to Region
al Settings, goto the numbers tab. There it will
> give you the option to change . to ,.
>
> The other way to change between the two is to convert the number into
> a string. Then search the string for the character and replace it
> with the other one.
>
> Brian
0 Kudos
Message 3 of 5
(4,100 Views)
Try something like this:

case EVENT_KEYPRESS:
// key masks are defined in "userint.h"
asciiCode = eventData1 & VAL_ASCII_KEY_MASK;
virtualKey = eventData1 & VAL_VKEY_MASK;

if (asciiCode != 0 && (eventData1 & VAL_MENUKEY_MODIFIER) ==
0)
{
switch (asciiCode)
{
case ',':
FakeKeystroke ('.');
break;
}
break;
}


Norbert Rieper schrieb:
>
> what I mean by 'numblock' are the num keys at the right side of the
> keyboard. And I'm looking for a possibility independent from the regional
> settings to always change the ','-key into a'.'-
key. I know that I can use a
> string instaed of a numeric input and after EVENT_COMMIT change the ',' into
> a '.'. But I thought that there must be a possibility to do it right away
> when ever the key is pressed.
>
> Norbert
>
> "bman" schrieb im Newsbeitrag
> news:506500000005000000CA4A0000-1004225886000@exchange.ni.com...
> > Norbert
> >
> > I'm not sure what you mean by 'numblock', though there are two ways I
> > can think of to change . to ,. The first way is to change the
> > regional settings in Windows. Do this by going into Window's Control
> > Panel then to Regional Settings, goto the numbers tab. There it will
> > give you the option to change . to ,.
> >
> > The other way to change between the two is to convert the number into
> > a string. Then search the string for the character and replace it
> > with the other one.
> >
> > Brian

--
Rainer Zieschang

--

LDIC Germany

Voice +49 35207 863 0 LEMKE DIAGNOSTICS GmbH
Fax +49 35207 863 11
Radeburger Str. 47
01468 Volkersdorf, Germany
mailto: zieschang@ldic.de http://www.ldic.de/


=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
0 Kudos
Message 4 of 5
(4,100 Views)
Since you are writing from Germany, you can try the different keyboard layout available for German language; in my version of Win98 (italian) I notice that there are 3 different layouts for german language (marked IBM, Standard and Swiss): maybe one of them is suitable for your needs. I had a similar problem with the italian version of Windows and solved it simply changing from the 'Italian' to the 'Italian 142' layout.

The following in case you don't know how to change the keyboard layout: in Control panel select Keyboard, then Language tab, then click on the language you are using between those installed and push 'Properties' button: in the popup that appears you can select the desired keyboard layout.

Hope this helps a little.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 5
(4,100 Views)