I use a special ocx in one of my forms to control a fiscal printer (used in this country as mandatory watchdogs for the tax dept. You send the invoice data to the fiscal printer, it calculates the VAT, print the invoice and returns an invoice number. The data remains in the fiscal printer memory and is audited by the tax dept)
What I do is something like this: _vfp.autoyield = .f. thisform.timer = 500000000 && by setting the timer to a super high value you are actually disabling it do your stuff ( in my case I have to see how many invoices generated by my system were not printed, using a cursor adapter. The fiscal printer prints every invoice and returns the invoice number it generates I use a timer to check the records every 5 seconds to see whether there are any invoices not yet printed and when the FP returns the invoice number, I update the record and mark it as read) thisform.timer = 5000 && set it back to 5 seconds _vfp.autoyield = .t. Rafael Copquin El 23/11/2010 16:42, Fred Taylor escribió: > _VFP.AutoYield > > Fred > > > > On Tue, Nov 23, 2010 at 12:32 PM, Sytze de Boer<[email protected]> wrote: >> Dave, thank you once again for attempts to assist this feeble one >> I've checked the help file but I'll be darned if I can find the autoyield >> property >> Because I do use an ActiveX (mscomm32) in this app, I've added a line in my >> Main.prg that says autoyield=.f. >> I hope this is what you meant >> >> >> S >> >> >> >> On Wed, Nov 24, 2010 at 12:10 AM, Dave Crozier<[email protected]>wrote: >> >>> Sytze, >>> I have had similar problems in the past when using external ActiveX calls >>> from the times or using the comms ports. I suggest that once you are in the >>> timer, the first thing you do is to actually disable it then do the >>> processing and enable it when this process has finished. Really it shouldn't >>> make any difference as VFP will not multithread but I found that it worked >>> and stopped the same type of errors happening. Note that the timer will not >>> call ar regular intervals in "time" but "after" a specific time following >>> the processing finishing. >>> >>> Also if you have any activeX's present have you remembered to set the >>> Autoyield property to be .F. as this can also screw up the VFP timers. >>> >>> Dave C >>> >>> >>> -----Original Message----- >>> From: [email protected] [mailto:[email protected]] On Behalf >>> Of Sytze de Boer >>> Sent: 23 November 2010 04:42 >>> To: profox >>> Subject: Strange error >>> >>> I have a timer on a form >>> Interval=1000 >>> The Timer starts with (line 1) >>> LOCAL lcInput, lcDate, lcTime, lcCallID >>> WITH thisform >>> lk=inkey() >>> Buffer = .oleComm.Input >>> IF !empty(buffer) >>> do callerid >>> ELSE >>> .timer1.enabled = .t. >>> ENDIF >>> ENDWITH >>> >>> Occasionally this throws an error and my error routine tells me >>> Function argument value, type, or count is invalid. >>> >>> My error routine has parameters of errprog, progline, and mess1 >>> where errprog = the calling program, progline is program line >>> >>> This tellsme it occurs "PROCEDURE FRMCALLID.TIMER1.TIMER " >>> It tells me it occurs on line 0 >>> >>> Can anyone help me where/what I sould be looking for? >>> >>> -- >>> Regards >>> Sytze de Boer >>> Kiss Systems >>> >>> >>> --- StripMime Report -- processed MIME parts --- >>> multipart/alternative >>> text/plain (text body -- kept) >>> text/html >>> --- >>> [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

