Lost Password?

CodeCall Programming Blog

Programming Blog

Johnnyboy's Blog
Johnnyboy Description:
No desc available

If you've ever wanted to restrict a texbox control to accept only numbers and not even allow the user to type characters this is how to do it.  Note that this code also allows the user to type non alpha characters like backspace.

private void txtNumber_KeyDown(object sender, KeyEventArgs e)
{
     if ((e.KeyValue > 0 && e.KeyValue < 31) || (e.KeyValue > 47 && e.KeyValue < 58))
    

Statistics

Members Today: 144
Members Online: 6
Users Online: 93
Total Users: 12,840
Total Threads: 8,600
Total Posts: 63,566
Newest Member: flashitool

Tutorials

Working with Halftones - By Genny
It's been a while... but somebody asked me to write another Effects tutorial, so I picked halftones, because their fun to mess around with :) Start by using the paintbucket and set a backround Colo...


Setting up server 2003
I blogged about doing this since I've been asked on numerous occasions about how its done. The blog is at : -------------------------------------------------- Setting up Windows Server 2003 as a...


Formatting Numbers for Currency Display in JavaScr...
Methods-Number.toFixed(x) Description -Formats any number for "x" number of trailing decimals. The number is rounded up, and "0"s are used after the decimal point if needed to create the desired...