Page 1 of 1

VFP9 Application.AutoYield = .F.

Posted: Mon Mar 17, 2014 6:51 am
by stanlyn
Hi,

Why is gdPicture suggesting "Application.AutoYield = .F.". It was suggested in the sample with no explanation why. What are the behaviors this setting fixes?

Thanks, Stanley

Re: VFP9 Application.AutoYield = .F.

Posted: Mon Mar 17, 2014 7:39 pm
by Loïc
Hello,

This is a typical vfp coding recommendation when dealing with ActiveX controls.
The AutoYield property should be set to false (.F.) when a form contains an ActiveX control. Setting AutoYield to false (.F.) prevents events for an ActiveX control from executing between lines of user program code. For example, if AutoYield is set to true (.T.), clicking an ActiveX control while user program code is executing may cause an event for the ActiveX control to execute, ignoring the user program code for the event, producing undesirable or unpredictable results.
More info: http://msdn.microsoft.com/en-us/library ... s.71).aspx

With best regards,

Loïc Carrère

Re: VFP9 Application.AutoYield = .F.

Posted: Tue Mar 18, 2014 2:52 am
by stanlyn
Thanks Loic,

Glad to here that it is not anything specific to gdPicture! I was already aware of how to run activeX controls in VFP, as I have to deal with that with Leadtools. If behavior is same as other activeX controls, then great...

Thanks, Stanley