Click here to Skip to main content
11,410,750 members (63,949 online)
Click here to Skip to main content

Yet Another Custom Currency Box

, 23 May 2009 CPOL
Rate this:
Please Sign up or sign in to vote.
Control that only allows numeric inputs
Sample Image - CurrencyBox.gif


Trying to make my first custom control, I decided to build a textbox that will only allow numeric inputs. So I searched on the internet and found a very good control (NumericBox). I try to reproduce it to include it in my new personal custom controls library.


  1. Use "," or "." to put the cursor before or after a decimal separator.
  2. "-" if enabled negative numbers add a minus sign.
  3. "+" Convert negative number to positive.
  4. BackSpace, erase the integer part of the number.
  5. Del, erase the decimal part of the number.

Thanks to

  • ProSoft for the great idea


  • 24/05/2009: Enhancement
    • Added MaxValue and MinValue properties
    • Added ShowThousand separator property
  • 28/01/2007: Fixed Bugs
    • Deleting a number with backspace, the control eliminates two numbers


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Juan Manuel Elosegui
Software Developer
Spain Spain
Graduado de Ingenieria Mecánica en la Cujae (2001),
Universidad de la Habana, Cuba

Comments and Discussions

QuestionSelect text on got focus event PinmemberMCAST7610-Dec-11 6:42 
GeneralI have Convert this Code Into VB but it doesn't work can u help me??? PinmemberSunLucDong16-Apr-11 22:13 
GeneralHindi Numbers PinmemberPeaceTiger6-Nov-10 11:22 
GeneralRe: Hindi Numbers PinmemberPeaceTiger6-Dec-10 22:03 
GeneralMy vote of 5 PinmemberPeaceTiger15-Oct-10 16:25 
GeneralNice control but i experienced some weird issues PinmemberMember 25738317-Jan-10 7:35 
GeneralMnemonics issue Pinmembereric marin15-Oct-09 6:02 
GeneralPocket PC project PinmemberPGuimaraes3-Sep-08 5:07 
GeneralThanks PinmemberDALAS_<><>15-Jun-07 0:11 
GeneralChange to to control Pinmemberhardsoft14-Jun-07 10:54 
GeneralBut it's in C# Code not C++ PinmemberNacereddine29-Jan-07 2:20 
GeneralThank you! PinmemberMCAST7626-Jan-07 8:12 
GeneralRe: Thank you! PinmemberJuan Manuel Elosegui28-Jan-07 5:12 
GeneralRe: Thank you! PinmemberMCAST7628-Jan-07 14:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150414.5 | Last Updated 23 May 2009
Article Copyright 2006 by Juan Manuel Elosegui
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid