Hi all
How can I programmatically change the currency symbol at runtime using either dc_regquery/dc_regwrite() or winapi functions.
Thanks
Joe
How to change currency symbol in windows
Re: How to change currency symbol in windows
Hi, Joe.
The currency symbol is set at HKCU\Control Panel\International -> "sCurrency". Just write a different symbol to the reg variable, done. You know how to use DC_RegWrite() for this?
If you want to set it just for a session, "SetLocalInfoA" (KERNEL32.DLL) is the API-function to use.
The currency symbol is set at HKCU\Control Panel\International -> "sCurrency". Just write a different symbol to the reg variable, done. You know how to use DC_RegWrite() for this?
If you want to set it just for a session, "SetLocalInfoA" (KERNEL32.DLL) is the API-function to use.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: How to change currency symbol in windows
Hi Tom
Great !!!
I appreciate
Joe
Great !!!
I appreciate
Joe
Re: How to change currency symbol in windows
Hi all
I got the dc_regquerry() and dc_regwrite() working. Now I have one problem some currency symbols have decimal code outside the range 0 to 255 and therefore cannot be copied to the program or saved into database. Like Korea won and Nigeria Naira for example has decimal code 8358. They also have hexadecimal codes. Is there a function similar to chr() that can convert the hexadecimal codes to character
Thanks
Joe
I got the dc_regquerry() and dc_regwrite() working. Now I have one problem some currency symbols have decimal code outside the range 0 to 255 and therefore cannot be copied to the program or saved into database. Like Korea won and Nigeria Naira for example has decimal code 8358. They also have hexadecimal codes. Is there a function similar to chr() that can convert the hexadecimal codes to character
Thanks
Joe
Re: How to change currency symbol in windows
Hi all
I got the dc_regquerry() and dc_regwrite() working. Now I have one problem some currency symbols have decimal code outside the range 0 to 255 and therefore cannot be copied to the program or saved into database. Like Korea won and Nigeria Naira for example has decimal code 8358. They also have hexadecimal codes. Is there a function similar to chr() that can convert the hexadecimal codes to character
Thanks
Joe
I got the dc_regquerry() and dc_regwrite() working. Now I have one problem some currency symbols have decimal code outside the range 0 to 255 and therefore cannot be copied to the program or saved into database. Like Korea won and Nigeria Naira for example has decimal code 8358. They also have hexadecimal codes. Is there a function similar to chr() that can convert the hexadecimal codes to character
Thanks
Joe
Re: How to change currency symbol in windows
Hi,
My PowerUtl library have functions to convert char to/from hex, char to/from bin, dec to/from hex, dec to/from bin, dec to/from byte string, but I suppose this is not an option for you. You can check Ot4xb library.
My PowerUtl library have functions to convert char to/from hex, char to/from bin, dec to/from hex, dec to/from bin, dec to/from byte string, but I suppose this is not an option for you. You can check Ot4xb library.
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: How to change currency symbol in windows
@Joe: User program should not change users local language/date/currency settings for entire OS .
Is there reason ? Like printing out invoices into PDF but with different currency each time and report using 'currency' field to print like old R&R .
Is there reason ? Like printing out invoices into PDF but with different currency each time and report using 'currency' field to print like old R&R .
Re: How to change currency symbol in windows
It's been a bunch of years, but I remember writing a function i.e. mycurrency() which would return the correct code to print.
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
breadmanbrian@bsky.social
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
breadmanbrian@bsky.social
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: How to change currency symbol in windows
Hi Brian
Kindly post the source for mycurrency() function that you mentioned for members benefits
Thanks
Joe
Kindly post the source for mycurrency() function that you mentioned for members benefits
Thanks
Joe
Re: How to change currency symbol in windows
I haven't seen the code since I sold the company in 2019. But, it was a series of do case statements, where it would return the currency character based on the currency choice of the buyer or seller record.
Roger might have the old code somewhere. I don't have it anymore.
it would be called something like:
at xx,yy dc_say mycurrency(buyer or seller variable) + the amount to print.
Wish I could be more help, but I haven't touched coding in 6 years.
Roger might have the old code somewhere. I don't have it anymore.
it would be called something like:
at xx,yy dc_say mycurrency(buyer or seller variable) + the amount to print.
Wish I could be more help, but I haven't touched coding in 6 years.
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
breadmanbrian@bsky.social
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
breadmanbrian@bsky.social
http://www.breadmanrises.com
FB travel group: The Breadman Rises