ActiveX - Para ver se o Adobe Reader foi instalado
Enviado: 22 Out 2011 00:02
Existe alguma função equivalente em Harbour como a IsActivex() que tem em FiveWin ?
Antes de chamar Load após o objeto da TActiveX() gostaria de verificar se o Adobe foi instalado. Algo assim:Pois sem essa verificação, está sujeito a erro "No exported method".
Antes de chamar Load após o objeto da TActiveX() gostaria de verificar se o Adobe foi instalado. Algo assim:
Código: Selecionar todos
Function testa PDFActivex(oWnd)
MyProgID := ""
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 Empty( MyProgID )
MsgStop( 'No PDF Activex installed' )
return .f.
endif
ActiveX = TActiveX():New( oWnd, MyProgID )
return .t.