Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Viewing PDF In IE Control
Message
From
22/04/2008 18:54:25
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01312276
Message ID:
01312517
Views:
19
I would add a limit of time in this loop:
LOCAL lnSecs, lnLimitTime
lnSecs = SECONDS()
lnLimitTime = 5 && 5 seconds

DO WHILE (Thisform.oWB.OBJECT.Busy OR Thisform.oWB.OBJECT.ReadyState <> 4)
   IF SECONDS() - lnSecs > lnLimitTime
      MESSAGEB("Could not load the document")
      EXIT
   ENDIF
   DOEVENTS
ENDDO
>How big s the PDF?
>or (similar question, How fast is your INet connection?)
>What happens if you use this:
>
>DO WHILE (Thisform.oWB.OBJECT.Busy OR Thisform.oWB.OBJECT.ReadyState <> 4)
>   DOEVENTS
>ENDDO
>
>BUT be careful. That could cause your system hangs. You could use this just for testing purposes.
>
>
>>The code is exact. Again, if I walk it through, all is ok. When I let it run, the pages and toolbars don't hide.
>>
>>
>>
>>>Did you modify code exactly as I posted? What do you get if you remove TRY...ENDTRY?
>>>
>>>>Strange. If I step it through in the debugger, it works fine. If I just let it run, I still see the toolbar and
>>>>side pane.
>>>>
>>>>>
>>>>>Try
>>>>>
>>>>>...
>>>>>		* Load PDF
>>>>>		Thisform.oWB.OBJECT.Navigate2(Thisform.cPdfFileName)
>>>>>		* Wait for load to complete
>>>>>		lnSeconds = SECONDS()
>>>>>		DO WHILE (Thisform.oWB.OBJECT.Busy OR Thisform.oWB.OBJECT.ReadyState <> 4) ;
>>>>>				AND SECONDS() - lnSeconds < 60
>>>>>			DOEVENTS
>>>>>		ENDDO
>>>>>
>>>>>		TRY
>>>>>			loDoc = Thisform.oWB.oBJECT.Document
>>>>>			= loDoc.setPageMode("Page Only")
>>>>>			= loDoc.setShowToolbar(0)
>>>>>		FINALLY 	
>>>>>			loDoc = null
>>>>>		ENDTRY	
>>>>>...
>>>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform