|
-
Aug 23rd, 2000, 02:17 AM
#1
Thread Starter
Lively Member
I want an input field for a amount and I want it to look something like #0.00. The problem is that the program will be used with diffrent regional settings. That means that sometime it will be a decimal "," and sometimes a decimail ".".
I have treid to use a textbox but is that the smartest way to get it to display "5.60" or "5,60" depending to the settings then the user enters "5.6" or "5,6". I also want to convert it to a Long by multiply it with 100.
Yesterday, all my troubles seemed so far away...
Help, I need somebody, Help...
Now MCSD and still locking for intresting job in the south parts of Stockholm, Sweden.
-
Aug 23rd, 2000, 05:03 AM
#2
Frenzied Member
Auto-formatting currency boxes have always been a pain in the ass. You could try the masked edit box control that's shipped with VB - or you could buy an add-on component from http://www.componentsource.com - search there for controls. Most of them have free eval copies so you can find a good one. I know Apex do one (www.apexsc.com) but they bundle it along with many other data-aware controls and it's quite expensive.
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Aug 23rd, 2000, 05:13 AM
#3
Try using the Format function:
Code:
Text1 = Format$(Text1, "0.00")
Good luck!
-
Aug 23rd, 2000, 10:10 AM
#4
Thread Starter
Lively Member
Thanks Joacim, I got the format OK !
My next question is how to get out 1.35 from both "1.35" and "1,35", is there a VB function or do I have to do it by my self ?
[Edited by AKA on 08-24-2000 at 01:09 AM]
Yesterday, all my troubles seemed so far away...
Help, I need somebody, Help...
Now MCSD and still locking for intresting job in the south parts of Stockholm, Sweden.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|