A TActiveX working sample using Acrobat Reader 7

A TActiveX working sample using Acrobat Reader 7

Postby Enrico Maria Giordano » Sun May 28, 2006 7:25 am

Here it is:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: A TActiveX working sample using Acrobat Reader 7

Postby Enrico Maria Giordano » Sun May 28, 2006 12:50 pm

This is an alternative:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Mon May 29, 2006 11:01 am

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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Mon May 29, 2006 11:19 am

No, I will check it, thank you.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Adolfo » Mon May 29, 2006 12:56 pm

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
;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
User avatar
Adolfo
 
Posts: 860
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile

Postby Antonio Linares » Mon May 29, 2006 2:07 pm

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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests