textbox currency

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jose

    #1

    textbox currency

    Hello. Please i need un textboxt type currency with 2 decimals. Very
    professional. The controls maskeditbox doesn't professional.

    Thanks you for tour help


  • Chris Dunaway

    #2
    Re: textbox currency

    I'm not sure if this is what you want, but try this:

    Dim amount As Decimal = 100.00M

    TextBox1.Text = amount.ToString ("C2")

    Comment

    • Jose

      #3
      Re: textbox currency

      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

      "Chris Dunaway" <dunawayc@gmail .com> escribió en el mensaje
      news:1147986512 .101428.63700@y 43g2000cwc.goog legroups.com...[color=blue]
      > I'm not sure if this is what you want, but try this:
      >
      > Dim amount As Decimal = 100.00M
      >
      > TextBox1.Text = amount.ToString ("C2")
      >[/color]


      Comment

      • Homer J Simpson

        #4
        Re: textbox currency


        "Jose" <josenospam@uni ca.com> wrote in message
        news:Oi5iWX1eGH A.3488@TK2MSFTN GP02.phx.gbl...
        [color=blue]
        > 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[/color]

        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.EventArg s) Handles TextBox1.Leave
        Dim myCurr As Decimal
        myCurr = CDec(TextBox1.T ext)
        TextBox1.Text = Format(myCurr, "Currency")
        End Sub


        Comment

        Working...