Sign in to follow this  
Followers 0
Kombat

PDF Load Completed Question

3 posts in this topic

There is a long delay when a PDF loads, so ... how can I display a progress message while the PDF is loading and dismiss the progress when the load is fully completed?

Just putting progress bars don't work, as they get dismissed when the function ends, but the PDF has not loaded yet.

$oPDF = ObjCreate("AcroPDF.PDF.1")

$GUI_ActiveX = GUICtrlCreateObj($oPDF, 319, 4, 697, 618)

GUICtrlSetStyle($GUI_ActiveX, $WS_VISIBLE)

GUICtrlSetResizing($GUI_ActiveX, $GUI_DOCKAUTO) ; Auto Resize Object

_Show_PDF("Testfile")

;Here's the function that loads the PDF

Func _Show_PDF($m)

;I want to display a progress bar here

;=============================

;$oPDF = ObjCreate("AcroPDF.PDF.1")

$oPDF.src = $m

; Clear up

$Obj1 = ""

;I want to dismiss the progress bar here

;===============================

EndFunc ;==>_Show_PDF

I have looked in the Forum, and this topic did not show up. Any suggestions?

Share this post


Link to post
Share on other sites



Kombat,

Try a marquee progress - then you do not have to worry about the duration: ;)

#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>

$hGUI = GUICreate("Test", 500, 500)
GUICtrlCreateProgress(10, 10, 400, 20, $PBS_MARQUEE)
GUICtrlSendMsg(-1, $PBM_SETMARQUEE, True, 50) ; final parameter is update time in ms
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Any use? :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Kombat,

Try a marquee progress - then you do not have to worry about the duration: ;)

#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>

$hGUI = GUICreate("Test", 500, 500)
GUICtrlCreateProgress(10, 10, 400, 20, $PBS_MARQUEE)
GUICtrlSendMsg(-1, $PBM_SETMARQUEE, True, 50) ; final parameter is update time in ms
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Any use? :)

M23

Thanks, but the progress bar will dismiss before the PDF has loaded. Even though in theory the PDF should be loaded when the function ends, it is not.

There is a very long delay, that varies by file size, and I want to determine when the control has completed refreshing before dismissing the progress bar.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0