Query NT-Country-Settings 
Author Message
 Query NT-Country-Settings

Hi,

does anybody know how to obtain the Country-Settings from Windows Nt.
I need to know which char (.,) is the decimal-point.

I know this is stored in the registry
(HKEY_CURRENT_USER\Control Panel\International), but i don't know how to
query the registry.
I think there must be a function in some native NT-Dll which does this.

If anybody knows that function, please repost or mail back.

Thanks
Stefan ;-)

||   Stefan Tauche   Siemens Semiconductor Group, Muenchen
||  

\\=========(remove NoSpam from address to reply)===========



Mon, 09 Jul 2001 03:00:00 GMT  
 Query NT-Country-Settings

Quote:

> Hi,
> does anybody know how to obtain the Country-Settings from Windows Nt.
> I need to know which char (.,) is the decimal-point.
> I know this is stored in the registry
> (HKEY_CURRENT_USER\Control Panel\International), but i don't know how to
> query the registry.
> I think there must be a function in some native NT-Dll which does this.
> If anybody knows that function, please repost or mail back.
> Thanks
> Stefan ;-)

Go to search.microsoft.com/default.asp
register your MSDN account (urks) and
search for "RegQuery".
Then use labview's "Call Library Function" to call them.

Good luck !

--
Andreas Mohr



Mon, 09 Jul 2001 03:00:00 GMT  
 Query NT-Country-Settings

Quote:

> does anybody know how to obtain the Country-Settings from Windows Nt.
> I need to know which char (.,) is the decimal-point.

The only way I know is to look in the Control Panel -> Regional Settings.

I always force LabVIEW to use (.) as decimal point.
This is done by UNselecting "Use localized decimal point" in the preferences.
(And restart labview after this change to update.)

The reason for this is that instrument expect numbers to be sent with the format
123.456 If you send 123,456 there will be problem.

Hope you got something useful out of this.
/Jonas



Mon, 09 Jul 2001 03:00:00 GMT  
 Query NT-Country-Settings
Hallo, Jonas,

Du meintest am 21.01.99 zum Thema Re: Query NT-Country-Settings:

Quote:
> This is done by UNselecting "Use localized decimal point" in the
> preferences. (And restart labview after this change to update.)

> The reason for this is that instrument expect numbers to be sent
> with the format 123.456 If you send 123,456 there will be problem.

Not all instruments ...
I like working with the Metex DMM (the german distributor Conrad sells it,  
too). It is connected to the serial port and shows the measured value with  
a decimal colon.
Some of my pupils have witten a BASIC-like vi to convert the colon to a  
point. Big, but it worked. It was written for Labview 3.0.

Viele Gruesse!
Helmut



Mon, 09 Jul 2001 03:00:00 GMT  
 Query NT-Country-Settings

Quote:

> Hallo, Jonas,
> Du meintest am 21.01.99 zum Thema Re: Query NT-Country-Settings:
> > This is done by UNselecting "Use localized decimal point" in the
> > preferences. (And restart labview after this change to update.)

> > The reason for this is that instrument expect numbers to be sent
> > with the format 123.456 If you send 123,456 there will be problem.
> Not all instruments ...
> I like working with the Metex DMM (the german distributor Conrad sells it,  
> too). It is connected to the serial port and shows the measured value with  
> a decimal colon.
> Some of my pupils have witten a BASIC-like vi to convert the colon to a  
> point. Big, but it worked. It was written for Labview 3.0.

AFAIK my father has bought several Metex, too.
IMHO the decimal point thing is a holy mess in LabView.
All those string to number conversion routines should have an optional boolean
input for . or , notation.
And yes, I've written such a conversion beast, too :-)
Who hasn't ?

--
Andreas Mohr



Fri, 13 Jul 2001 03:00:00 GMT  
 Query NT-Country-Settings
...

Quote:
> IMHO the decimal point thing is a holy mess in LabView.
> All those string to number conversion routines should have an optional boolean
> input for . or , notation.
> And yes, I've written such a conversion beast, too :-)
> Who hasn't ?

I think Stepan Riha pointed it out several days ago, but
then it may have been on info-labview, LV5 pretty much
has the input you are talking about.  The simpler one
function string functions don't, but the growable Format
to String and Scan from String have an item in the dialog
at the bottom of the ring menu that lets you specify
which character you want as the decimal separator.  So you
can even use : for the instrument you were just speaking of.
This setting is specific to a node; so you can make the UI
string formatting functions use a %,; and the instrument
strings formatting uses a %.; code or whatever makes sense
for your country and customer.  Other nodes like the
spreadsheet functions also have an input.

Greg McKaskle



Fri, 13 Jul 2001 03:00:00 GMT  
 Query NT-Country-Settings

Quote:

> ...
> > IMHO the decimal point thing is a holy mess in LabView.
> > All those string to number conversion routines should have an optional
boolean
> > input for . or , notation.
> > And yes, I've written such a conversion beast, too :-)
> > Who hasn't ?
> I think Stepan Riha pointed it out several days ago, but
> then it may have been on info-labview, LV5 pretty much
> has the input you are talking about.  The simpler one
> function string functions don't, but the growable Format
> to String and Scan from String have an item in the dialog
> at the bottom of the ring menu that lets you specify
> which character you want as the decimal separator.  So you
> can even use : for the instrument you were just speaking of.
> This setting is specific to a node; so you can make the UI
> string formatting functions use a %,; and the instrument
> strings formatting uses a %.; code or whatever makes sense
> for your country and customer.  Other nodes like the
> spreadsheet functions also have an input.
> Greg McKaskle

Ah, finally :-)

Maybe another improvement:

Would it make sense to add an attribute node field to retrieve the HDC
and/or HWND of some panel controls ?
That way you would be able to draw e.g. filled circles into diagrams without
any hassle by using "Call Library Function".
But maybe that approach can be considered as being too "dirty".

--
Andreas Mohr



Fri, 13 Jul 2001 03:00:00 GMT  
 Query NT-Country-Settings
...

Quote:
> Maybe another improvement:

> Would it make sense to add an attribute node field to retrieve the HDC
> and/or HWND of some panel controls ?
> That way you would be able to draw e.g. filled circles into diagrams without
> any hassle by using "Call Library Function".
> But maybe that approach can be considered as being too "dirty".

We are off on another thread now, but its a short answer.  LV controls don't
have an HDC or HWND.  They are more like the window-less MS controls.  The
control is quite flexible, and we will be making more of that available over
time -- we don't it to be done incorrectly.  This will allow for more programmatic
control over objects on the panel.

Greg McKaskle



Sat, 14 Jul 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. API - country settings

2. querying the optimization settings

3. MySQL query in PHP: Not query zero amounts also removes null amounts from query

4. Setting Windows NT environment variables from VisualWorks

5. Setting time under NT

6. Programmatically setting PATH environment variable in Windows NT

7. NT Rexx - setting environment variable - how?

8. setting up System variable under NT with Rexx

9. ObjRexx to query NT Registry

10. Setting NT file permissions from Regina Rexx

11. Regina Rexx for Windows NT cannot query after connecting to remote Registry

12. setting pythonpath on Windows NT

 

 
Powered by phpBB® Forum Software