Visual FoxPro Note

<< Click to Display Table of Contents >>

Navigation:  How To Use the VPE Control > VPE ActiveX >

Visual FoxPro Note

Previous pageReturn to chapter overviewNext page

To make Visual FoxPro process all VPE events, and to prevent getting sporadic "OLE Exception Error" messages, you need to set in VFP the system variable "_VFP.AutoYield = .F."

If you want that a form which contains the VPE ActiveX is closed when the Close Button in VPE's toolbar is clicked, do not call thisform.release when processing the event AfterDestroyWindow(), because VFOX will GPF for an unknown reason. Workaround: hide the Close Button in VPE's toolbar by setting tbClose = .F. - since the VFP form already has a Close Button.

Otherwise, there is the following workaround: when receiving the AfterDestroyWindow() event fired by VPE, start a timer with 0,1 second delay. After the timer has been counted down, you may call thisform.release safely.