Home All Groups Group Topic Archive Search About
Author
18 May 2006 6:27 PM
Jose
Hello. Please i need un textboxt type currency with 2 decimals. Very
professional. The controls maskeditbox doesn't professional.

Thanks you for tour help

Author
18 May 2006 9:08 PM
Chris Dunaway
I'm not sure if this is what you want, but try this:

Dim amount As Decimal = 100.00M

TextBox1.Text = amount.ToString("C2")
Author
19 May 2006 3:06 PM
Jose
The idea is that the user when press decimal point the cursor goes to de
decimal places and show me formated 999,999,999.99

Help me

Show quoteHide quote
"Chris Dunaway" <dunaw***@gmail.com> escribió en el mensaje
news:1147986512.101428.63700@y43g2000cwc.googlegroups.com...
> I'm not sure if this is what you want, but try this:
>
> Dim amount As Decimal = 100.00M
>
> TextBox1.Text = amount.ToString("C2")
>
Author
19 May 2006 5:46 PM
Homer J Simpson
"Jose" <josenospam@unica.com> wrote in message
news:Oi5iWX1eGHA.3488@TK2MSFTNGP02.phx.gbl...

> The idea is that the user when press decimal point the cursor goes to de
> decimal places and show me formated 999,999,999.99

This is possible but your question (problem) is very hard to understand.

Private Sub TextBox1_Leave(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TextBox1.Leave
    Dim myCurr As Decimal
    myCurr = CDec(TextBox1.Text)
    TextBox1.Text = Format(myCurr, "Currency")
End Sub