?
Solved

Key validation in Winform

Posted on 2007-03-20
3
Medium Priority
?
702 Views
Last Modified: 2008-02-26
Hi All,
I have textbox and I want the user enter only Numbers. Is there an event to do this in Winform like onkeypress and do the validation.
Basically I want him to Enable only numbers key on the keyboard for this textbox.
0
Comment
Question by:AdibRahman77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 25

Accepted Solution

by:
dstanley9 earned 75 total points
ID: 18759344
In VS 2005 you can use the MaskedTextBox control.  In VS2003 you can use a TextBox and handle the OnKeyPress event.  Here's a samplt control that does this:

http://www.codeproject.com/cs/miscctrl/maskedcsedit.asp
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 18760641
0
 
LVL 9

Assisted Solution

by:sun4sunday
sun4sunday earned 75 total points
ID: 18761619
0

Featured Post

Major Serverless Shift

Comparison of major players like AWS, Microsoft Azure, IBM Bluemix, and Google Cloud Platform

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question