Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Adobe viewing control
Message
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01002070
Message ID:
01002289
Views:
27
Hi everybody,

May be someone can at least replicate that problem?

Thanks in advance.

>More info for the problem:
>
>
>local lcFile
>lcFile = getfile('pdf')
>if not empty(m.lcFile)
>	thisform.newobject("olecontrol1","olecontrol") && ,"","","AcroPDF.PDF.1")
>	with thisform.olecontrol1
>*  .OLEClass = "AcroPDF.PDF.1"
>		.top = 48
>		.left = 12
>		.height = 392
>		.width = 500
>		.loadfile(m.lcFile)
>		.setzoom(100)
>		.setShowToolbar(.f.)
>		.visible = .t.
>	endwith
>endif
>
>Note the commented part in the NewObject. If I uncomment it, I will get an Ole Error on trying to set .visible to true.
>
>Now, this code
>
>PUBLIC oform1
>
>oform1=NEWOBJECT("form1")
>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 cmdTP AS commandbutton WITH ;
>      Top = 12, ;
>      Left = 250, ;
>      Height = 27, ;
>      Width = 100, ;
>      Caption = "TimePass", ;
>      Name = "cmdTimePass"
>
>   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 = "AcroPDF.PDF.1", ;
>      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)
>         THISFORM.olecontrol1.OBJECT.setZoom(10)
>         THISFORM.olecontrol1.setShowToolbar (.T.)
>
>      ENDIF
>   ENDPROC
>
>   PROCEDURE cmdTimePass.Click
>		thisform.olecontrol1.OBJECT.setZoom(100)
>		thisform.olecontrol1.OBJECT.setPageMode(3)
>		thisform.olecontrol1.setShowToolbar (.F.)
>
>   ENDPROC
>
>
>   PROCEDURE cmdexit.Click
>      ThisForm.Release()
>   ENDPROC
>
>ENDDEFINE
>
>
>works just fine.
>
>Can you explain me, why and what we should do about it?
>
>Thanks.
>
>
>>Hi everybody,
>>
>>I had Adobe 6 and I can add a viewer ActiveX to the form. I just upgraded to the version 7 of Adobe Acrobat and now when I'm trying to execute the test form with this object added, I'm getting an error. My colleague has form defined in code (not visually) and it works this way.
>>
>>Do you know, what is the problem with this new ActiveX and is there anything I can do to address it?
>>
>>Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform