Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
e.Handled = !(Char.IsDigit(e.KeyChar) || e.KeyChar == '\b' || e.KeyChar == '.');
Posted

1 solution

 
Share this answer
 
Comments
MeftahDAKHEEL 31-Mar-15 1:25am    
@peter, thanks for your kind solution, but when made a numeric class, i face this error as follow:
Error 1 The type or namespace name 'NumberFormatInfo' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Bisan\Documents\Visual Studio 2010\Projects\Graduation System\Graduation System\NumericTextBox.cs 21 9 Graduation System
Peter Leow 31-Mar-15 1:36am    
It was stated in the "Compiling the Code" section, it needs this namespace:
using System.Globalization;
MeftahDAKHEEL 31-Mar-15 1:53am    
i wish you great morning Peter, thanks a lot, i am new to C# this is my graduation project Information System Diploma
Peter Leow 31-Mar-15 2:06am    
You are welcome.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900