Juliano,
> So when I check with the function IsOcxInstalled(), it
> always returns false, regardless the ocx I test, but when I
> run this test, it returns the ocx installed on my pc
> (AcroPDF.PDF.1):
>
> IF IsActivex( "PDF.PdfCtrl.1" ); MyProgID :=
> "PDF.PdfCtrl.1"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.2" ); MyProgID :=
> "PDF.PdfCtrl.2"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.3" ); MyProgID :=
> "PDF.PdfCtrl.3"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.4" ); MyProgID :=
> "PDF.PdfCtrl.4"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.5" ); MyProgID :=
> "PDF.PdfCtrl.5"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.6" ); MyProgID :=
> "PDF.PdfCtrl.6"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.7" ); MyProgID :=
> "PDF.PdfCtrl.7"; ENDIF
> IF IsActivex( "AcroPDF.PDF.1" ); MyProgID :=
> "AcroPDF.PDF.1"; ENDIF
> IF IsActivex( "AcroPDF.PDF.2" ); MyProgID :=
> "AcroPDF.PDF.2"; ENDIF
> IF !Empty( MyProgID )
> MSGINFO( MyProgID+" Installed")
> ELSE
> MSGINFO( 'No PDF Activex installed, please install Adobe
> Reader and try again.' )
> RETURN .F. ENDIF
>
> //-------------------------------------
>
> FUNCTION IsActivex(cACTIVEX)
> LOCAL oOCX,e
> TRY
> oOCX := GetActiveObject( cACTIVEX )
> CATCH e
> TRY
> oOCX := CreateObject( cACTIVEX )
> CATCH e
> RETURN .F. END
> END
> RETURN .T.
> Remembering that you need to have acrobat reader installed
> on your pc.
>
> I'm able to load it on a TWebBrowser windows, but I cant
> control it, eg.: I cant control the zoom, disable toolbar,
> change property. Is there any way I can do that through the
> webbrowser?
It's because in ActiveX() you are testing for the existence of ActiveX
*components* (OLE automation servers), while IsOcxInstalled() search for
ActiveX *controls* (OCX). Both are different things.
It seem that "AcroPDF.PDF.1" is an ActiveX component, but not an OCX.
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info