Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jamie Osborn
  Where is Jamie Osborn?
 Melbourne
 Australia
 Jamie Osborn
 To: John Discallar
  Where is John Discallar?
 Nagoya
 Japan
 John Discallar
 Tags
Subject: RE: Filtering Character in Edit/Text box
Thread ID: 15948 Message ID: 16111 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Wednesday, October 09, 2002 10:30:43 AM         
   


> > >
> > > NQ In Visual Basic if we want to filter a character in Edit/Text box; in KeyPress event we assigan value 0 (Zero) to argument named KeyAscii.
> > > How can I obtain same result in VFP?
> >
> > If you mean that you want to stop certain chracters from being entered....
> > eg. Stop character "a" from being entered
> >
> > KeyPress()
> > LPARAMETERS nKeyCode, nShiftAltCtrl
> > 
> > IF nKeyCode = 97
> >   NODEFAULT
> > ENDIF  
> > 

> >
> > Cheers,
> > Jamie
> > jamie.osborn@foxite.com
>
>
> How about if you want the characters to in LOWER case ? (for email address purposes)
>
> Foxpro Child

Put this in the KeyPress() event instead
IF BETWEEN(nKeyCode,65,90)
	DODEFAULT(nKeyCode + 32)  && Convert to lower case and carry out default behaviour
	NODEFAULT  && Don't carry out default behaviour again !!!
ENDIF

Cheers,
Jamie
jamie.osborn@foxite.com

ENTIRE THREAD

Filtering Character in Edit/Text box Posted by naeem ud din @ 10/4/2002 5:38:54 PM
RE: Filtering Character in Edit/Text box Posted by Jamie Osborn @ 10/9/2002 7:50:00 AM
RE: Filtering Character in Edit/Text box Posted by Caij Gomez @ 10/9/2002 9:02:17 AM
RE: Filtering Character in Edit/Text box Posted by Jamie Osborn @ 10/9/2002 10:30:43 AM