Click here to Skip to main content
12,948,566 members (62,117 online)
Click here to Skip to main content
Add your own
alternative version


24 bookmarked
Posted 26 Nov 2006

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

You may also be interested in...

Comments and Discussions

QuestionSelect text on got focus event Pin
MCAST7610-Dec-11 5:42
memberMCAST7610-Dec-11 5:42 
GeneralI have Convert this Code Into VB but it doesn't work can u help me??? Pin
SunLucDong16-Apr-11 21:13
memberSunLucDong16-Apr-11 21:13 
GeneralHindi Numbers Pin
PeaceTiger6-Nov-10 10:22
memberPeaceTiger6-Nov-10 10:22 
GeneralRe: Hindi Numbers Pin
PeaceTiger6-Dec-10 21:03
memberPeaceTiger6-Dec-10 21:03 
GeneralMy vote of 5 Pin
PeaceTiger15-Oct-10 15:25
memberPeaceTiger15-Oct-10 15:25 
GeneralNice control but i experienced some weird issues Pin
Member 25738317-Jan-10 6:35
memberMember 25738317-Jan-10 6:35 
GeneralMnemonics issue Pin
eric marin15-Oct-09 5:02
membereric marin15-Oct-09 5:02 
GeneralPocket PC project Pin
PGuimaraes3-Sep-08 4:07
memberPGuimaraes3-Sep-08 4:07 
GeneralThanks Pin
DALAS_<><>14-Jun-07 23:11
memberDALAS_<><>14-Jun-07 23:11 
GeneralChange to to control Pin
hardsoft14-Jun-07 9:54
memberhardsoft14-Jun-07 9:54 
GeneralBut it's in C# Code not C++ Pin
Nacereddine29-Jan-07 1:20
memberNacereddine29-Jan-07 1:20 
GeneralThank you! Pin
MCAST7626-Jan-07 7:12
memberMCAST7626-Jan-07 7:12 
GeneralRe: Thank you! Pin
Juan Manuel Elosegui28-Jan-07 4:12
memberJuan Manuel Elosegui28-Jan-07 4:12 
GeneralRe: Thank you! Pin
MCAST7628-Jan-07 13:52
memberMCAST7628-Jan-07 13:52 

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

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

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