Page 1 of 1
A TActiveX working sample using Acrobat Reader 7
Posted: Sun May 28, 2006 7:25 am
by Enrico Maria Giordano
Here it is:
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oWnd, oPdf
DEFINE WINDOW oWnd
oPdf = TActiveX():New( oWnd, "{CA8A9780-280D-11CF-A24D-444553540000}" )
oPdf:Do( "LoadFile", "filename" )
oWnd:oClient = oPdf
ACTIVATE WINDOW oWnd
RETURN NIL
EMG
Re: A TActiveX working sample using Acrobat Reader 7
Posted: Sun May 28, 2006 12:50 pm
by Enrico Maria Giordano
This is an alternative:
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oWnd, oPdf
DEFINE WINDOW oWnd
oPdf = TActiveX():New( oWnd, "AcroPDF.PDF" )
oPdf:Do( "LoadFile", "filename" )
oWnd:oClient = oPdf
ACTIVATE WINDOW oWnd
RETURN NIL
But they have a problem: the process AcroRd32.exe remains active after the end of the sample execution. Is there any way to unload it? I already tried various options without success: oPdf:End(), oPdf:Do( "Close" ), DeleteObject( oPdf:hActiveX ), etc.
EMG
Posted: Mon May 29, 2006 11:01 am
by Antonio Linares
Enrico,
Have you checked if after some time it gets unloaded ? Sometimes the activex remains loaded for some time and later on it gets closed.
Posted: Mon May 29, 2006 11:19 am
by Enrico Maria Giordano
No, I will check it, thank you.
EMG
Posted: Mon May 29, 2006 12:56 pm
by Adolfo
Antonio Linares wrote:Enrico,
Have you checked if after some time it gets unloaded ? Sometimes the activex remains loaded for some time and later on it gets closed.
Antonio, is there a way to know if the Activex Control is already loaded on memory, and a way to unloaded it if is true.
While doing some tests with an epson ocx, I got plenty of problems, I needed to reboot to make things work, so I think it was because it get loaded...
Any idea
Posted: Mon May 29, 2006 2:07 pm
by Antonio Linares
Adolfo,
With some OCXs, like Acrobat Reader, if you press Ctrl+Alt+Del you can see AcroRd32.exe is loaded.
On some other OCXs where EXEs are not used, it may be more difficult to know it.