Catch Event From ActiveX Using VFP 9.0

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Catch Event From ActiveX Using VFP 9.0

Postby esimnick » Thu Jul 01, 2010 6:50 pm

I am using vpe to preview a document and need to detect when the preview has been closed. I am using Visual FoxPro 9.0. I need to know how to catch an event from the control to tell my program to continue.
esimnick
 
Posts: 4
Joined: Thu Jul 01, 2010 6:41 pm

Postby elcsoft » Thu Jul 01, 2010 7:59 pm

I use as well VFP9. I do it like that

At the start make the preview internal with
poVPE.externalwindow=.f.


Then

poVPE.preview()
push key
on key label ctrl+E clear events
poVPE.DefineKey(VKEY_CLOSE,VKEY_ESCAPE, 0, 0)
read events
pop key

put in the "afterdestroywindow" event of the OCX
Code: Select all
clear events


Like that, if the preview is closed your programm will continue and with escape you can close the preview
elcsoft
 
Posts: 36
Joined: Wed Jan 26, 2005 9:09 am

Postby esimnick » Fri Jul 02, 2010 9:10 pm

Thanks, that works great.
esimnick
 
Posts: 4
Joined: Thu Jul 01, 2010 6:41 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 76 guests