Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Erik Gomez
  Where is Erik Gomez?
 Victorias City, Negros Occidental
 Erik Gomez
 To: Jefferson Aguilar
  Where is Jefferson Aguilar?
 Jefferson Aguilar
Subject: RE: Customizing InputMask Property - help again...
Thread ID: 50779 Message ID: 50814 # Views: 2 # Ratings: 0
Version: Visual FoxPro 8 Category: Other
Date: Monday, September 06, 2004 11:28:19 AM         

> Good day again foxpro expertz!
> How can I able to customize the inputmask property of a textbox?
> What I'd like to happen (if possible) is to allow input for alphanumeric characters (excluding spaces) and underscores only...
> Is it possible sirs?? Or am i gonna trap it only in the InteractiveChange or Valid Events only??
> Thanks!
> GOD bless...
> Jefferson Aguilar of Nueva Ecija Philippines
> jeffaguilar_pyc@yahoo.com
> "There is only one GOD... and He loves us all..."
place this in the textbox's keypress event
If Between(nKeyCode,48,57) Or nKeyCode = 95;
	Or Between(nKeyCode,97,122) Or Between(nKeyCode,65,90)
	* 95 = '_', 48-57 = 0-9,97-122 = 'a-z' and 65-90 = 'A-Z'
	* allow or do some processing if needed to
	* don't allow

i hope you got the idea, you may have to trap the arrowkeys, backspace key, delete and other keys so that data entry can be achieved.
Erik Gomez
www.foxite.com - The Home of The Visual FoxPro Experts
Long Live www.foxite.com


Customizing InputMask Property - help again please Posted by Jefferson Aguilar @ 9/6/2004 8:25:47 AM
RE: Customizing InputMask Property - help again... Posted by Erik Gomez @ 9/6/2004 11:28:19 AM