Open and View a Document
Because you must open a document before you can view, print, or save it, or perform any other operation on it, viewing a document means to open and view a document. It is possible, however, to open a document without viewing it, or in other words, to open a document with view mode disabled. In this mode, you can print or save the document without viewing it.
To open and view a document, call the Open
method. See Open for a description of the possible return codes.
For example:
nRet = KeyView1.Open("c:\docs\bigtree.jpg")
Using the default settings, this example results in a view of the specified document. However, a number of properties are available to change the default behavior of the Open
method. See Control Properties for a list of relevant properties. The properties that begin with "OPEN
" (for example, the OPENMode
property and OPENWaitOnOpen
property) apply to the Open
method.
When a document is opened successfully, the OpenDocDone
and PageNumber
events are generated. These events indicate the progress of the document processing.