Click here to Skip to main content
15,913,186 members
Home / Discussions / C#
   

C#

 
Generalmemory drive Pin
farzad000126-Jul-05 21:03
farzad000126-Jul-05 21:03 
GeneralExtension File .vsi Pin
Brendan Vogt26-Jul-05 21:02
Brendan Vogt26-Jul-05 21:02 
Questionwat shd i do 1st? Pin
nidhelp26-Jul-05 21:01
nidhelp26-Jul-05 21:01 
AnswerRe: wat shd i do 1st? Pin
tatchung26-Jul-05 21:11
tatchung26-Jul-05 21:11 
GeneralRe: wat shd i do 1st? Pin
nidhelp26-Jul-05 22:26
nidhelp26-Jul-05 22:26 
GeneralRe: wat shd i do 1st? Pin
sreejith ss nair27-Jul-05 1:22
sreejith ss nair27-Jul-05 1:22 
GeneralRe: wat shd i do 1st? Pin
nidhelp27-Jul-05 15:17
nidhelp27-Jul-05 15:17 
GeneralRe: wat shd i do 1st? Pin
sreejith ss nair27-Jul-05 18:03
sreejith ss nair27-Jul-05 18:03 
In .NET we have value type called Char Structure. You can use this to identify whether the given character belongs to your expected type (Digits,Letter, Number,Punctuations etc) or not.

You call requirded methods of that structure on KeyPress event of your respective control.

Eg:
<br />
///The below given event-handler will only accept integer type.

private void CtextThree_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)<br />
{<br />
	 if(Char.IsDigit(e.KeyChar)) //this will return true if  user typed value is belongs to a char type.<br />
	 e.Handled=false;<br />
	 else<br />
	 e.Handled=true;<br />
			<br />
}<br />

This is a sample exmaple to come out with a solution. Hope this will surve your purpose.

Sreejith Nair
[ My Articles ]
GeneralRe: wat shd i do 1st? Pin
Jon Hulatt27-Jul-05 1:32
Jon Hulatt27-Jul-05 1:32 
GeneralRe: wat shd i do 1st? Pin
nidhelp27-Jul-05 15:14
nidhelp27-Jul-05 15:14 
GeneralRe: wat shd i do 1st? Pin
sreejith ss nair27-Jul-05 18:05
sreejith ss nair27-Jul-05 18:05 
Generalarraylist object search problem Pin
iramg26-Jul-05 20:53
iramg26-Jul-05 20:53 
GeneralRe: arraylist object search problem Pin
cshaaaa26-Jul-05 21:01
cshaaaa26-Jul-05 21:01 
GeneralRe: arraylist object search problem Pin
iramg26-Jul-05 21:31
iramg26-Jul-05 21:31 
GeneralRe: arraylist object search problem Pin
S. Senthil Kumar27-Jul-05 1:32
S. Senthil Kumar27-Jul-05 1:32 
Generallinking problem Pin
nidhelp26-Jul-05 20:08
nidhelp26-Jul-05 20:08 
GeneralRe: linking problem Pin
Luis Alonso Ramos26-Jul-05 20:11
Luis Alonso Ramos26-Jul-05 20:11 
GeneralRe: linking problem Pin
Luis Alonso Ramos26-Jul-05 20:14
Luis Alonso Ramos26-Jul-05 20:14 
GeneralRe: linking problem Pin
cshaaaa26-Jul-05 20:21
cshaaaa26-Jul-05 20:21 
GeneralRe: linking problem Pin
nidhelp26-Jul-05 20:33
nidhelp26-Jul-05 20:33 
GeneralNeed your help on NUnit Pin
Sachin Gedam26-Jul-05 19:29
Sachin Gedam26-Jul-05 19:29 
GeneralRe: Need your help on NUnit Pin
Maqsood Ahmed26-Jul-05 22:01
Maqsood Ahmed26-Jul-05 22:01 
GeneralRe: Need your help on NUnit Pin
Sachin Gedam27-Jul-05 2:48
Sachin Gedam27-Jul-05 2:48 
GeneralHighlighting an application on the taskbar Pin
cshaaaa26-Jul-05 18:38
cshaaaa26-Jul-05 18:38 
GeneralHost ... is not allow to connect to this mySQL server Pin
binglin26-Jul-05 18:35
binglin26-Jul-05 18:35 

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.