VFP9 Application.AutoYield = .F.

Discussions about GdPicture.NET usage in non managed applications built in vb6, Delphi, vfp, MFC c++ etc...
Post Reply
stanlyn
Posts: 22
Joined: Wed Mar 05, 2014 8:29 pm

VFP9 Application.AutoYield = .F.

Post by stanlyn » Mon Mar 17, 2014 6:51 am

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

User avatar
Loïc
Site Admin
Posts: 5526
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: VFP9 Application.AutoYield = .F.

Post by Loïc » Mon Mar 17, 2014 7:39 pm

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

stanlyn
Posts: 22
Joined: Wed Mar 05, 2014 8:29 pm

Re: VFP9 Application.AutoYield = .F.

Post by stanlyn » Tue Mar 18, 2014 2:52 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest