Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Previewing a PDF
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00949231
Message ID:
00949239
Views:
10
If oyu want it in a form you could use this:
PARAMETERS tFile
PUBLIC oform1

oform1=NEWOBJECT("form1")

IF VARTYPE(cFile) # "U"
   oForm1.cmdFile.Visible = .f.   
   oForm1.cmdExit.Visible = .f.   
   oForm1.oleControl1.Top = 12
   oForm1.oleControl1.LoadFile([&cFile])
ENDIF

oform1.Show
RETURN
**********************************************************
DEFINE CLASS form1 AS form

   DoCreate = .T.
   Caption = "pdfForm"
   Name = "Form1"

   ADD OBJECT cmdfile AS commandbutton WITH ;
      Top = 12, ;
      Left = 12, ;
      Height = 27, ;
      Width = 144, ;
      Caption = "Select File", ;
      Name = "cmdFile"

   ADD OBJECT cmdexit AS commandbutton WITH ;
      Top = 12, ;
      Left = 168, ;
      Height = 27, ;
      Width = 84, ;
      Caption = "E\<xit", ;
      Name = "cmdExit"

   ADD OBJECT olecontrol1 AS olecontrol WITH ;
      OLEClass = "PDF.PdfCtrl.5", ;
      Top = 48, ;
      Left = 12, ;
      Height = 192, ;
      Width = 348, ;
      Name = "Olecontrol1"

   PROCEDURE Init
      ThisForm.ReSize()
   ENDPROC

   PROCEDURE Resize
      ThisForm.Olecontrol1.Height = ThisForm.Height - 60
      ThisForm.Olecontrol1.Width = ThisForm.Width - 24
      ThisForm.Olecontrol1.Refresh()
   ENDPROC

   PROCEDURE cmdfile.Click
      LOCAL cFile
      cFile = GETFILE([PDF])
      IF !EMPTY(cFile)
         THISFORM.oleControl1.LoadFile([&cFile])
      ENDIF
   ENDPROC

   PROCEDURE cmdexit.Click
      ThisForm.Release()
   ENDPROC

ENDDEFINE
>Hi, I should implement a simple PDF files browser.
>
>What could I use? Is there any activeX control to do this?
>Thank you.
Previous
Reply
Map
View

Click here to load this message in the networking platform