Extending NumericUpDown Control

Does anyone know of an easy way to show a currency symbol inside of a NumericUpDown
control along with the number both inside the box?  It would be good if I could inherit from the NumericUpDown
control and add a $ sign to the left of the number in the text of the control and be able to edit
the number and not the $ sign.  Any help would be greatly appreciated.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gregoryew2Author Commented:
I forgot to mention that the dollar sign should be displayed all the time along with the number.
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
kaufmed 👽Commented:
You might need to play around with this a bit, but see if this gets you started (in addition to Idle_Mind's suggestion):

Imports System.ComponentModel
Imports System.Windows.Forms

Namespace _27494603
    Public Class CurrencyNumericUpDown
        Inherits UpDownBase
        Implements ISupportInitialize
        Private _value As Integer

        Public Overrides Sub DownButton()
            Me._value -= 1
            Me.UserEdit = True
        End Sub

        Public Overrides Sub UpButton()
            Me._value += 1
            Me.UserEdit = True
        End Sub

        Protected Overrides Sub UpdateEditText()
            Me.Text = "$ " & Me._value.ToString()
        End Sub

        Public Sub BeginInit() Implements ISupportInitialize.BeginInit
            Me._value = 0
        End Sub

        Public Sub EndInit() Implements ISupportInitialize.EndInit
        End Sub
    End Class
End Namespace

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.