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: Karben Selim Mejia
  Where is Karben Selim Mejia?
 San Pedro Sula
 Honduras
 Karben Selim Mejia
 Tags
Subject: RE: Firing an event depending on 12 diferent LEN
Thread ID: 33569 Message ID: 33708 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: Classes and Objects
Date: Tuesday, December 02, 2003 7:46:13 AM         
   


> > > Hey, I'm facing an issue here. I am trying to convert two form in a single one, everthing is just the same excep that the keyfield is diferent length
> > > the first one is 15 chars and the second one is 17.
> > >
> > > I don't have problems if the value is keyed, or when the value is scan and reach 17 chars. the problem I have is because certain things:
> > >
> > > 1. The Scanner doesn't have a carriage return automatic and.... won't have. that is not an option.
> > > 2. The value must be scan, it can be keyed but the user won't do that since he has a barcode.
> > >
> > > so the question here is: how do I fire the right method or UDF depending on the value if it is 15 or 17?
> > >
> > > I can't do it in the lost focus because if it is 15 this won't fire the event. can't do it in the key press, because may be when the text reach 15 the method will fire even if the user meant to key 17.
> > >
> > > any sugestion?
> > >
> > > Karben Selim Mejia
> > >
> > >
> > > For _N=1974 to OnlyGodKnows
> > > 

> > > Honduras, Central America
> > > The very centre of the world
> >
> > Is the scanner programmable at all ? eg. I use one that allows me to send special chars dependant upon the length of the scanned barcode etc.
> >
> > Cheers,
> > Jamie
> > jamie.osborn@foxite.com
>
> yes , it is, but can't touch it since I don't want to programm all of them.
>
> Karben Selim Mejia
>
>
> For _N=1974 to OnlyGodKnows
> 

> Honduras, Central America
> The very centre of the world

Well your only hope then is to use the keypresss event of the textbox you are capturing the scan to to fire a timer up after 15 characaters have been entered (increment a counter) and turn the timer off if you get to 17 characters or fire the timer event after a short gap (should only be 100 millisecs or something) which means that there were only 15 characters.

Cheers,
Jamie
jamie.osborn@foxite.com

ENTIRE THREAD

Firing an event depending on 12 diferent LEN Posted by Karben Selim Mejia @ 11/28/2003 11:14:14 PM
sorry. I ment 2 diferent LEN's Posted by Karben Selim Mejia @ 11/28/2003 11:15:56 PM
Try using timer and develop routines to check. Posted by Rene Relucio @ 11/29/2003 3:55:45 AM
RE: Try using timer and develop routines to check. Posted by Rene Relucio @ 11/29/2003 4:01:27 AM
RE: Try using timer and develop routines to check. Posted by Karben Selim Mejia @ 12/1/2003 3:00:34 PM
It fires whenever keys are struck! Posted by Rene Relucio @ 12/2/2003 4:23:14 AM
RE: It fires whenever keys are struck! Posted by Rene Relucio @ 12/2/2003 4:34:53 AM
RE: sorry. I ment 2 diferent LEN's Posted by suhas hegde @ 11/29/2003 5:46:49 AM
RE: sorry. I ment 2 diferent LEN's Posted by Karben Selim Mejia @ 12/1/2003 3:03:51 PM
RE: Firing an event depending on 12 diferent LEN Posted by Jamie Osborn @ 11/30/2003 11:36:45 PM
RE: Firing an event depending on 12 diferent LEN Posted by Karben Selim Mejia @ 12/1/2003 2:58:14 PM
RE: Firing an event depending on 12 diferent LEN Posted by Jamie Osborn @ 12/2/2003 7:46:13 AM
RE: Firing an event depending on 12 diferent LEN Posted by Willem van Oosten @ 12/2/2003 10:04:57 AM
RE: Firing an event depending on 12 diferent LEN Posted by Foxhound @ 12/4/2003 10:17:28 AM