by karinha » Sat Jun 01, 2024 1:09 pm
Mira, se ayuda:
// C:\FWH\SAMPLES\SHOWPDF3.PRG
#include "FiveWin.ch"
STATIC oWnd
FUNCTION Main()
LOCAL oActiveX, oPdf, oIco, oBar, oBmp, cFile
cFile := "C:\TEMP\MODELO.PDF"
SkinButtons()
DEFINE ICON oIco FILE "..\icons\fax.ico"
// mdichild ...no puede ser mdichild sin pertenecer a una ventana mdi
DEFINE WINDOW oWnd TITLE "Abrir un archivo *.pdf" COLOR "B/W" ICON oIco
DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd 2007
oActiveX := TActiveX():New( oWnd, "AcroPDF.PDF.1" )
oWnd:oClient := oActiveX
// oActiveX:Do( "LoadFile", "Prueba.pdf" )
oActiveX:Do( "LoadFile", cFile )
oActiveX:Do( "SetCurrentPage", 1 )
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
ACTION MsgInfo( "Prints this document" ) TOOLTIP "Print this document" GROUP
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
ACTION( oWnd:End() ) TOOLTIP "Exit this app" GROUP
DEFINE MESSAGE OF oWnd PROMPT FWVERSION + " <-kapiabafwh@gmail.com-> " + ;
FWCOPYRIGHT NOINSET CENTERED KEYBOARD DATE CLOCK 2007
ACTIVATE WINDOW oWnd MAXIMIZED
RETURN NIL
/* O:
ShellExecute( ,"open", cFicheroPdf,,,1 )
*/
// FIN / END
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341