Stellent.IBPM.Interop.Imaging.Controls

Objects
OptPage

Constants
Annotation Type
Page Overide Type Type


Optpage Control


AnnotationDown - OptPage (Viewer)

The AnnotationDown event is called by the OptPage control when the annotation toolbar is closed by the user. This occurs every time the toolbar is closed.

AnnotationDown Example

Syntax

C++

void AnnotationDown();

VB

Event AnnotationDown()

Remarks

Use an AnnotationDown event procedure to specify actions that will occur when a user closes the annotation toolbar, e.g., automatically saving annotations or displaying a custom dialog box.


ControlGotFocus - OptPage (Viewer)

The ControlGotFocus event is called by the OptPage control when a control receives focus.

ControlGotFocus Example

Syntax

C++

void ControlGotFocus(OLE_HANDLE hWndOld);

VB

Event ControlGotFocus(hWndOld As OLE_HANDLE)

Parameters

hWndOld As OLE_HANDLE

The ControlGotFocus event syntax has these parts:

Part | Description
HWndOld | Identifies the window that is losing focus.

Remarks

Use a ControlGotFocus event procedure to specify actions that will occur when an OptPage control gets focus. This event is called prior to the standard GotFocus event.


ControlLostFocus - OptPage (Viewer)

The ControlLostFocus event is called by the OptPage control when a control receives focus.

Syntax

C++

void ControlLostFocus(OLE_HANDLE hWndNew);

VB

Event ControlLostFocus(hWndNew As OLE_HANDLE)

Parameters

The ControlLostFocus event syntax has these parts:

Part | Description
hWndNew | Identifies the window that is getting focus.

Remarks

Use a ControlLostFocus event procedure to specify actions that will occur when an OptPage control loses focus. This event is called prior to the standard LostFocus event.


DoDblClick - OptPage (Viewer)

The DoDblClick event is called by the OptPage control when a mouse button is double-clicked within the control. The control normally processes the DoDblClick event after the application returns. You can set the EnableDefault to False to override this behavior.

DoDblClick Example

Syntax

C++

void DoDblClick(

short Button,

short Keys,

OLE_XPOS_PIXELS X,

OLE_YPOS_PIXELS Y,

short* EnableDefault);

VB

Sub object_DoDblClick(ByVal Button As Integer, ByVal Keys As Integer,

ByVal X As Single, ByVal Y As Single, EnableDefault As Integer)

Parameters

The DoDblClick event syntax has these parts:

Part | Description
Button | Identifies the button that was pressed. The button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.
Keys | Returns an integer that corresponds to the state of the SHIFT and CTRL keys when the button was pressed. A bit is set if the key is down. The argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0) and the CTRL key (bit 1). These bits correspond to the values 1 and 2, respectively. For example, if both CTRL and SHIFT were pressed, the value of Keys would be 3.
X, Y | Returns a number that specifies the current location of the mouse pointer. The x and y values are always expressed in terms of the coordinate system set by the ScaleHeight, ScaleWidth, ScaleLeft, and ScaleTop properties of the object.
EnableDefault | Flag that is passed back to the control. If bEnableDefault is set to False, the control does not process the DoDblClick event.

Remarks

Use a DoDblClick event procedure to specify actions that will occur when a user double-clicks the mouse within the control. If EnableDefault is modified, it must be the last line of code in the event.

If you need to test for the button or shift arguments, you can use constants listed in the Visual Basic (VB) object library in the Object Browser to define the bits within the argument.


DoMouseDown - OptPage (Viewer)

The DoMouseDown event is called by the OptPage control when a mouse button is pressed within the control. The control normally processes the DoMouseDown event after the application returns. You can set the EnableDefault to False to override this behavior.

DoMouseDown Example

Syntax

C++

void DoMouseDown(

short Button,

short Keys,

OLE_XPOS_PIXELS X,

OLE_YPOS_PIXELS Y,

short* EnableDefault);

VB

Sub object_DoMouseDown(ByVal Button As Integer, ByVal Keys As Integer, ByVal X As Single, ByVal Y As Single, EnableDefault As_ Integer)

Parameters

The DoMouseDown event syntax has these parts:

Part | Description
Button | Identifies the button that was pressed. The button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.
Keys | Returns an integer that corresponds to the state of the SHIFT and CTRL keys when the button was pressed. A bit is set if the key is down. The argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0) and the CTRL key (bit 1). These bits correspond to the values 1 and 2, respectively. For example, if both CTRL and SHIFT were pressed, the value of Keys would be 3.
X, Y | Returns a number that specifies the current location of the mouse pointer. The x and y values are always expressed in terms of the coordinate system set by the ScaleHeight, ScaleWidth, ScaleLeft, and ScaleTop properties of the object.
EnableDefault | Flag that is passed back to the control. If bEnableDefault is set to False, the control does not process the DoMouseDown event.

Remarks

Use a DoMouseDown event procedure to specify actions that will occur when a given mouse button is pressed or released. Unlike the Click and DblClick events, the DoMouseDown event enables you to distinguish between the left, right, and middle mouse buttons. You can also write code for mouse-keyboard combinations that use the SHIFT and CTRL keyboard modifiers. If EnableDefault is modified, it must be the last line of code in the event.

If you need to test for the button or shift arguments, you can use constants listed in the Visual Basic (VB) object library in the Object Browser to define the bits within the argument.


DoMouseMove - OptPage (Viewer)

The DoMouseMove event is called by the OptPage control when the mouse is moved within the control. The control normally processes the DoMouseMove event after the application returns. You can set the EnableDefault to False to override this behavior.

DoMouseMove Example

Syntax

C++

void DoMouseMove(

short Button,

short Keys,

OLE_XPOS_PIXELS X,

OLE_YPOS_PIXELS Y,

short* EnableDefault);

VB

Event DoMouseMove(Button As Integer, Keys As Integer, X As Single, Y As Single, EnableDefault As Integer)

Parameters

The DoMouseMove event syntax has these parts:

Part | Description
Button | Identifies the button that was pressed. The button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.
Keys | Returns an integer that corresponds to the state of the SHIFT and CTRL keys when the button was pressed. A bit is set if the key is down. The argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0) and the CTRL key (bit 1). These bits correspond to the values 1 and 2, respectively. For example, if both CTRL and SHIFT were pressed, the value of Keys would be 3.
X, Y | Returns a number that specifies the current location of the mouse pointer. The x and y values are always expressed in terms of the coordinate system set by the ScaleHeight, ScaleWidth, ScaleLeft, and ScaleTop properties of the object.
EnableDefault | Flag that is passed back to the control. If bEnableDefault is set to False, the control does not process the DoMouseMove event.

Remarks

Use a DoMouseMove event procedure to specify actions that will occur when the mouse is moved while a mouse button is pressed. If EnableDefault is modified, it must be the last line of code in the event.

To test for the button or shift arguments, use the constants listed in the Visual Basic (VB) object library in the Object Browser to define the bits within the argument.


DoMouseUp - OptPage (Viewer)

The DoMouseUp event is called by the OptPage control when a mouse button is released within the control. The control normally processes the DoMouseUp event after the application returns. You can set the EnableDefault to False to override this behavior.

DoMouseUp Example

Syntax

C++

void DoMouseUp(

short Button,

short Keys,

OLE_XPOS_PIXELS X,

OLE_YPOS_PIXELS Y,

short* EnableDefault);

VB

Event DoMouseUp(Button As Integer, Keys As Integer, X As Single, Y As Single, EnableDefault As Integer)

Parameters

The DoMouseDown event syntax has these parts:

Part | Description
Button | Identifies the button that was released. The button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.
Keys | Returns an integer that corresponds to the state of the SHIFT and CTRL keys when the button was pressed. A bit is set if the key is down. The argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0) and the CTRL key (bit 1). These bits correspond to the values 1 and 2, respectively. For example, if both CTRL and SHIFT were pressed, the value of Keys would be 3.
X, Y | Returns a number that specifies the current location of the mouse pointer. The x and y values are always expressed in terms of the coordinate system set by the ScaleHeight, ScaleWidth, ScaleLeft, and ScaleTop properties of the object.
EnableDefault | Flag that is passed back to the control. If bEnableDefault is set to False, the control does not process the DoMouseUp event.

Remarks

Use a DoMouseUp event procedure to specify actions that will occur when a given mouse button is pressed then released. The DoMouseUp event enables you to distinguish between the left, right, and middle mouse buttons. You can also write code for mouse-keyboard combinations that use the SHIFT and CTRL keyboard modifiers. If EnableDefault is modified, it must be the last line of code in the event.

If you need to test for the button or shift arguments, you can use constants listed in the Visual Basic (VB) object library in the Object Browser to define the bits within the argument.

Note

This is the series of requirement to enable the firing of the DoMouseUpEvent. Be advised, using the following steps will override the Rubberband zoom functionality.

1. Handle the DoMouseDown event.

2. In the handler set EnableDefault to false.

3. Handle the DoMouseUp event.


DoNextPage - OptPage (Viewer)

The DoNextPage event is called by the OptPage control when the next page in a document is about to be displayed.

DoNextPage Example

Syntax

C++

void DoNextPage(

long NextPageNumber,

short* EnableDefault);

VB

Event DoNextPage(NextPageNumber As Long, EnableDefault As Integer)

Parameters

The DoNextPage event syntax has these parts:

Part | Description
NextPageNumber | The number of the page that is about to be displayed.
EnableDefault | Flag that is passed back to the control. If bEnableDefault is set to False, the control does not process the DoNextPage event.

Remarks

Use a DoNextPage event procedure to specify actions that will occur when the next page is displayed in the control, e.g., setting the page number in a text field. To prevent the next page from being displayed, set EnableDefault to False. If EnableDefault is modified, it must be the last line of code in the event.

See also Appendix B - IBPM Toolkit Related Functionality


DoPageChanged - OptPage (Viewer)

The PageChanged event is called when the displayed page in the control changes.

DoPageChanged Example

Syntax

C++

void DoPageChanged();

VB

Sub object_ PageChanged()

Remarks

Use a PageChanged event procedure to capture and process any changes to the current page in the control. These changes include loading and unloading, zoom, rotate, and next / previous pages.

See also Appendix B - IBPM Toolkit Related Functionality


DoPrevPage - OptPage (Viewer)

The DoPrevPage event is called by the OptPage control when the previous page in a document is about to be displayed.

DoPrevPage Example

Syntax

C++

void DoPrevPage(

long PrevPageNumber,

short* EnableDefault);

VB

Sub object_ DoPrevPage(ByVal PrevPageNumber As Long, EnableDefault As Integer)

Parameters

The DoPrevPage event syntax has these parts:

Part | Description
PrevPageNumber | The number of the page that is about to be displayed.
EnableDefault | Flag that is passed back to the control. If bEnableDefault is set to False, the control does not process the DoPrevPage event.

Remarks

Use a DoPrevPage event procedure to specify actions that will occur when the previous page is displayed in the control, e.g., setting the page number in a text field. To prevent the previous page from being displayed, set EnableDefault to False. If EnableDefault is modified, it must be the last line of code in the event.

See also Appendix B - IBPM Toolkit Related Functionality


DoRectangle - OptPage (Viewer)

The DoRectangle event is called by the OptPage control when a mouse button is released within the control, after previously being pressed and dragged.

DoRectangle Example

Syntax

C++

void DoRectangle(

OLE_XPOS_PIXELS Left,

OLE_YPOS_PIXELS Top,

OLE_XPOS_PIXELS Right,

OLE_YPOS_PIXELS Bottom,

short* EnableDefault);

VB

Event DoRectangle(Left As Single, Top As Single, Right As Single, Bottom As Single, EnableDefault As Integer)

The DoRectangle event syntax has these parts:

Part | Description
Left, Top, Right, Bottom | Returns the coordinates of the rectangle.
EnableDefault | Flag that is passed back to the control. If bEnableDefault is set to False, the control does not process the DoRectangle event.

Remarks

Use a DoRectangle event procedure to specify actions that will occur upon completion of a MouseDown-MouseDrag-MouseUp sequence, such as automatic zooming, or popping up a menu box. The control normally processes the DoRectangle event after the application returns and displays a pop-up menu with options for Zoom and CopyToClipboard. Setting the EnableDefault parameter to False inhibits the OptPage control from performing this default action. If EnableDefault is modified, it must be the last line of code in the event.


DoSaveAnnots - OptPage (Viewer)

Syntax

C++

void DoSaveAnnots(short* EnableDefault);

VB

Event DoSaveAnnots(EnableDefault As Integer)

Remarks

This occurs before the PromptSave Dialog is displayed. If bEnable is false, the dialog will not be displayed. This event can be used to display a custom save dialog or to prevent any other dialog from being displayed.

See also Appendix B - IBPM Toolkit Related Functionality


DoSelectPage - OptPage (Viewer)

The DoSelectPage event is called by the OptPage control when the document page is about to change.

Example

Syntax

C++

void DoSelectPage(

long SelectedPageNumber,

short* EnableDefault);

VB

Event DoSelectPage(SelectedPageNumber As Long, EnableDefault As Integer)

Parameters

The DoSelectPage event syntax has these parts:

Part | Description
SelectedPageNumber | The new document page number.
EnableDefault | Flag that is passed back to the control. If bEnableDefault is set to False, the control does not process the DoSelectPage event.

Remarks

Use a DoSelectPage event procedure to specify actions that will occur before a new document page is displayed. This event is called after the DisplayPage method. Setting the EnableDefault parameter to False inhibits the OptPage control from performing the page change operation. If EnableDefault is modified, it must be the last line of code in the event.

See also Appendix B - IBPM Toolkit Related Functionality


DoZoom - OptPage (Viewer)

The DoZoom event is called by the OptPage control when the document is about to be scaled.

DoZoom Example

Syntax

C++

void DoZoom(

short ZoomPercent,

short* EnableDefault);

VB

Event DoZoom(ZoomPercent As Integer, EnableDefault As Integer)

Parameters

The DoZoom event syntax has these parts:

Part | Description
ZoomPercent | The new document scale percent.
EnableDefault | Flag that is passed back to the control. If EnableDefault is set to False, the control does not process the DoZoom event.

Remarks

Use a DoZoom event procedure to specify actions that will occur before a document is rescaled. This could include automatically displaying the current scale factor using the ZoomPercent parameter or inhibiting scale below or above a set limit. Setting the EnableDefault parameter to False inhibits the OptPage control from performing the scale operation. If EnableDefault is modified, it must be the last line of code in the event.


DragOver - OptPage (Viewer)

This stock event is documented in the MSDN library.

Occurs when a drag-and-drop operation is in progress.

Syntax

VB

Event DragOver(Source As Control, X As Single, Y As Single, State As Integer)


GotFocus - OptPage (Viewer)

This stock event is documented in the MSDN library.

Occurs when an object receives the focus, either by user action, such as tabbing to or clicking the object, or by changing the focus in code using the SetFocus method.

Syntax

VB

Event GotFocus()

Remarks

Typically, you use a GotFocus event procedure to specify the actions that occur when a control or form first receives the focus. For example, by attaching a GotFocus event procedure to each control on a form, you can guide the user by displaying brief instructions or status bar messages. You can also provide visual cues by enabling, disabling, or showing other controls that depend on the control that has the focus.

An object can receive the focus only if its Enabled and Visible properties are set to True.


KeyDown - OptPage (Viewer)

The KeyDown event is called by the OptPage control when a key is pressed within the control.

KeyDown Example

Syntax

C++

void KeyDown(

short* KeyCode,

short Shift);

VB

Event KeyDown(KeyCode As Integer, Shift As Integer)

Parameters

The KeyDown event syntax has these parts:

Part | Description
object | An OptPage custom control object.
KeyCode | A key code. The parameter is passed by reference; changing it sends a different character to the control. Setting KeyCode to 0 cancels the keystroke so that the control does not receive the key.

Remarks

Use a KeyDown event procedure to capture and process keystrokes, where you need to respond to both the key press and the key release (see the KeyUp Event ). Otherwise, use the KeyPress Event .


KeyPress - OptPage (Viewer)

The KeyPress event is called by the OptPage control when a key is pressed within the control.

KeyPress Example

Syntax

C++

void KeyPress(short* KeyAscii);

VB

Event KeyPress(KeyAscii As Integer)

The KeyPress event syntax has these parts:

Part | Description
KeyAscii | An integer that returns a standard ANSI key code. The parameter is passed by reference; changing it sends a different character to the control. Setting KeyAscii to 0 cancels the keystroke so that the control does not receive the key.

Remarks

Use a KeyPress event procedure to capture and process keystrokes.


KeyUp - OptPage (Viewer)

The KeyUp event is called by the OptPage control when a key is released within the control.

KeyUp Example

Syntax

C++

void KeyUp(

short* KeyCode,

short Shift);

VB

Event KeyUp(KeyCode As Integer, Shift As Integer)

The KeyUp event syntax has these parts:

Part | Description
KeyCode | A key code. The parameter is passed by reference; changing it sends a different character to the control. Setting KeyCode to 0 cancels the keystroke so that the control does not receive the key.

Remarks

Use a KeyUp event procedure to capture and process keystrokes, where you need to respond to both the key press and the key release (see the KeyDown event). Otherwise, use the KeyPress event.


LostFocus - OptPage (Viewer)

This stock event is documented in the MSDN library.

Occurs when the object loses the focus, either by user action, such as tabbing to or clicking another object, or by changing the focus in code using the SetFocus method.

Syntax

VB

Event LostFocus()


SaveSetup - OptPage (Viewer)

Syntax

C++

void SaveSetup(

BSTR Key,

BSTR SetupFile);

VB

Sub SaveSetup()


Validate - OptPage (Viewer)

This stock event is documented in the MSDN library.

Occurs when a control loses focus to a control that causes validation.

Syntax

VB

Event Validate(Cancel As Boolean)


AboutBox - OptPage (Viewer)

Displays the AboutBox dialog window for the OptPage Viewer ActiveX control.

AboutBox Example

Syntax

C++

void AboutBox();

VB

Sub AboutBox( )

Remarks

The AboutBox dialog describes the name and version of the control.


AutoLoadMimeType - OptPage (Viewer)

Syntax

C++

VARIANT_BOOL AutoLoadMimeType(

BSTR FileName,

long ViewerFlags,

long SecurityLevel,

BSTR UserName,

BSTR MimeType);

VB

Function AutoLoadMimeType(FileName As String, ViewerFlags As Long, SecurityLevel As Long, UserName As String, MimeType As String) As Boolean


AutoLoadPage - OptPage (Viewer)

Automatically determines the page type and loads it into the OptPage Viewer ActiveX control.

Syntax

C++

VARIANT_BOOL AutoLoadPage(

BSTR FileName,

long ViewerFlags,

long SecurityLevel,

BSTR UserName,

long TypeOverride);

VB

Function object.AutoLoadPage(FileName As String, ViewerFlags As Long, SecurityLevel As Long, UserName As String, TypeOverride As Long ) As Boolean

The AutoLoadPage method syntax has these parts:

Part | Description
FileName | File name of page to load.
ViewerFlags | Defines the capabilities of the current control. This value is the sum of selected options. (eg., 393434)
SecurityLevel | Defines the level of security for the document.
UserName | Identifies the current user to the control.
TypeOverride | Overrides automatic type handling (e.g., if a TIFF file had a TMP extension). Valid TypeOverride values: 1. NativeImage (TIFF) 2. COLD 3. Universal

Returns

Boolean

Remarks

The max path length for AutoLoadPage - FileName is 128 characters. It will not load the page if this is greater than 128 characters.

Sample

Dim strFilePath As String
Dim bReturn As Boolean

strFilePath = "c:\Image1.tif"

bReturn = frmView.OptPage1.AutoLoadPage(strFilePath, 64, 9, "AnyUserName", 0)

frmView.OptPage1.UnloadPage


AutoPrintPage - OptPage (Viewer)

AutoPrintPage Prints the page specified in the parameters.

Syntax

C++

VARIANT_BOOL AutoPrintPage(

BSTR FileName,

long ViewerFlags,

long SecurityLevel,

BSTR UserName,

long TypeOverride,

long StartPage,

long EndPage);

VB

Function object.AutoPrintPage(FileName As String, ViewerFlags As Long, SecurityLevel As Long, UserName As String, TypeOverride As Long, StartPage As Long, EndPage As Long) As Boolean

The AutoPrintPage method syntax has these parts:

Part | Description
FileName | File name of page to print.
ViewerFlags | Defines the capabilities of the current control. This value is the sum of selected options. (eg., 393434)
SecurityLevel | Defines the level of security for the document.
UserName | Identifies the current user to the control.
TypeOverride | Overrides automatic type handling (e.g., if a TIFF file had a TMP extension).
StartPage | Page number of the first page to be printed.
EndPage | Page number of the last page to be printed.

Returns

Boolean

Remarks

If the document contains more than 1 page, one can use StartPage and EndPage to specify the print range. If EndPage = -1 printing will begin at the StartPage and continue to end of the document. If StartPage = EndPage, printing will consist of only one page.


CalcVariableZoom - OptPage (Viewer)

Calculates a new scale factor based on the size of a rectangle. The coordinates of the rectangle are passed to the method. Also returns the horizontal and vertical scrollbar offsets. These offsets are calculated to place the zoomed rectangle full-size in the control.

CalcVariableZoom Example

Syntax

C++

single CalcVariableZoom(

long Left,

long Top,

long Right,

long Bottom,

long* HorzScrollOffset,

long* VertScrollOffset);

VB

Function object.CalcVariableZoom(Left as Long, Top as Long, Right as Long, Bottom as Long, HorzScrollOffset as Long, VertScrollOffset as Long) as Single

The CalcVariableZoom method syntax has these parts:

Part | Description
Left | Long pixel value of the left edge of the rectangle.
Top | Long pixel value of the top edge of the rectangle.
Right | Long pixel value of the right edge of the rectangle.
Bottom | Long pixel value of the bottom edge of the rectangle.
HorzScrollOffset | Returns as Long the calculated horizontal scroll offset.
VertScrollOffset | Returns as Long the calculated vertical scroll offset.

Returns

Float - represents new scale factor based on bounding rectangle.

Remarks

The CalcVariableZoom method can be used to manually zoom a document based on the size of a given rectangle.


DisplayPage - OptPage (Viewer)

Displays a specific page of a loaded document in the viewer control (Universals only).

DisplayPage Example

Syntax

C++

long DisplayPage(long PageNumber);

VB

Function object.DisplayPage(lPageNumber As Long) As Long

Parameters

The DisplayPage method syntax has these parts:

Part | Description
lPageNumber | Page number to display

Returns

Long - Zero indicates failure, non-zero indicates success.

Remarks

See also the PageNumber property.

See also Appendix B - IBPM Toolkit Related Functionality (Viewer)


DoAlignment - OptPage (Viewer)

Displays an alignment dialog for the current layered COLD page.

Syntax

C++

VARIANT_BOOL DoAlignment();

VB

Function object.DoAlignment() As Boolean

Returns

Boolean

Remarks

DoAlignment is generally used when you have a COLD page, and some sort of form to overlay. For example, if you are trying to overlay a form on top of a text file and the text does not fit the form, DoAlignment can be used to resize the text page so that it will fit within the boundaries of the form.


DoPrefsDlg - OptPage (Viewer)

The DoPrefsDlg method displays a dialog box containing a list of options for ShowBorders, CenterZooms, ShowAnnotations and initial loading scale. This is an alternative to programmatically adding each function individually.

Syntax

C++

VARIANT_BOOL DoPrefsDlg();

VB

Function DoPrefsDlg() As Boolean

Return Value

Boolean


DoPrintDlg - OptPage (Viewer)

Displays a print dialog similar to the Common Print Dialog, but with an additional "Options" button. This button opens another dialog enabling the printing of annotations and print sizing to fit the page.

Syntax

C++

VARIANT_BOOL DoPrintDlg();

VB

Function object.DoPrintDlg() As Boolean

Returns

Bool


Drag - OptPage (Viewer)

This stock method is documented in the MSDN library.

Begins, ends, or cancels a drag operation of any object except Line, Menu, Shape, and Timer.

Syntax

VB

Sub Drag([Action])


EndPrintJob - OptPage (Viewer)

Ends a custom print job.

Syntax

C++

void EndPrintJob();

VB

Sub EndPrintJob()

Returns

Integer - 1 is success, zero is failure.

Remarks

The EndPrintJob method terminates a custom print session that was initiated by the StartPrintJob method. This method is to be used in conjunction with the AutoPrintPage method. Print properties for the custom print session can be defined by using the PrintProperties . The custom print methods allow the application to display a custom dialog box to solicit print options. DoPrintDlg displays a common print dialog.


EnumComponentTypes - OptPage (Viewer)

The EnumComponentTypes method is used to return the component type value for any component that comprises a page object. For a list of component type values see below. The passed in index value is one based. If an invalid index is passed into the EnumComponentTypes method, a -1 will be returned to indicate the invalid index.

Syntax

C++

long EnumComponentTypes(short ComponentIndex);

VB

Function EnumComponentTypes(ComponentIndex As Integer) As Long

Function object.EnumComponentTypes () As Integer

Returns

Component Type Return Values:

0 - TIFF/IBPM Image

1 - Cold (Text)

2 - Universal (currently, any primary document that is not one of the two above)

10 - Annotation component

11 - Alignment component

Note: Additional types will be added in future releases of the IBPM toolkit.

Remarks

See also GetDisplayFileName method.


ExecuteAnnotProperty - OptPage (Viewer)

This function displays an Annotation Properties dialog box for the selected annotation.

Syntax

VB

Function ExecuteAnnotProperty() As Boolean

C++

VARIANT_BOOL ExecuteAnnotProperty();

Returns

Boolean

Remarks

Displays annotation properties dialog for the currently selected annotation. An annotation must be selected before invoking this function.


ExecuteAnnotToolboxCmd - OptPage (Viewer)

Executes an annotation toolbox command.

ExecuteAnnotToolBoxCmd Example

Syntax

VB

Function ExecuteAnnotToolboxCmd(CommandID As Integer) As Boolean

C++

VARIANT_BOOL ExecuteAnnotToolboxCmd(short CommandID);

The ExecuteAnnotToolboxCmd method syntax has these parts:

Part | Description
CommandID | The annotation command to be performed.

Returns

Boolean - True if the annotation command was successful, else false.

Remarks

It may be appropriate for an application to provide its own toolbar, possibly to limit the types of annotations available to the user. The Viewer OCX provides access to the ExecuteAnnotToolboxCMD method to allow the application to specify the annotation type to be available to the user, with the Viewer OCX handling the actual placement and drawing of the annotations. See the Annotations Overview for further details.

See also Appendix B - IBPM Toolkit Related Functionality


GetDisplayFileName - OptPage (Viewer)

Returns a String indicating the actual filename of the file being displayed in the control. Use either the EnumComponentTypes method or the PrimaryComponentIndex property to obtain a valid index that can be used as an input parameter to the GetDisplayFileName method.

GetDisplayFileName

Syntax

C++

BSTR GetDisplayFileName(long ComponentIndex);

VB

Function object.GetDisplayFileName(ComponentIndex As Long) As String

Parameters

The GetDisplayFileName method syntax has these parts:

Part | Description
ComponentIndex | The Component Index of the document currently displayed in the control.

Returns

String - value representing the displayed file name.


GetPageDescription - OptPage (Viewer)

Returns a string describing the type of document currently loaded into the control, e.g., for a Microsoft Word document, the method returns "MS WORD".

GetPageDescription Example

Syntax

C++

BSTR GetPageDescription();

VB

Function GetPageDescription As String

Returns

String - indicates the value of the Page Description.

Remarks

The return value of the method should always be checked.


IsModified - OptPage (Viewer)

Determines if the current page orientation has changed or annotations have been created, deleted, or modified.

IsModified Example

Syntax

C++

VARIANT_BOOL IsModified();

VB

Function IsModified() As Boolean

Returns

Boolean - True if the page has changed orientation or annotations have changed, else false.

Remarks

IsModified can be used to trigger the standard "Save Annotation" dialog box, or a custom dialog box.


IsNextPage - OptPage (Viewer)

Returns True if there is a next page in the document. If the currently displayed page is the last page in the document, the method returns False.

IsNextPage Example

Syntax

C++

VARIANT_BOOL IsNextPage();

VB

Function IsNextPage() As Boolean

Returns

Boolean

Remarks

IsNextPage and IsPrevPage can be used to set the state (enabled or disabled) of NextPage and PrevPage command buttons.

This method can be used in conjunction with IBPM document pages. See LoadOptikaPage for more information.

See also Appendix B - IBPM Toolkit Related Functionality


IsPrevPage - OptPage (Viewer)

Returns True if there is a previous page in the document. If the currently displayed page is the first page in the document, the method returns False.

IsPrevPage Example

Syntax

C++

VARIANT_BOOL IsPrevPage();

VB

Function IsPrevPage() As Boolean

Returns

Boolean

Remarks

IsNextPage and IsPrevPage can be used to set the state (enabled or disabled) of NextPage and PrevPage command buttons.

This method can be used in conjunction with IBPM document pages. See LoadOptikaPage for more information.

See also Appendix B - IBPM Toolkit Related Functionality


Launch - OptPage (Viewer)

Launches the application that is associated with the current document, e.g., if the document name is "TEST.DOC" and .doc is associated with MS Word in the WIN.INI or registry, the control will launch Microsoft Word.

Launch Example

Syntax

C++

VARIANT_BOOL Launch();

VB

Function Launch() As Boolean

Returns

Boolean

Remarks

If an application cannot be launched, the method returns False. Windows will return an error message such as:

Launch Application: OPTViewer [Launch failed for file "filename". No association exists for the file to be launched.]

If running Windows 9X, use Explorer | View | Options | File Types to create the association.


LoadOptikaPage - OptPage (Viewer)

Loads an IBPM document page.

Syntax

C++

VARIANT_BOOL LoadOptikaPage(

IDispatch* DocInfo,

long ViewerFlags,

long SecurityLevel,

BSTR UserName);

VB

Function LoadOptikaPage(DocInfo As Object, ViewerFlags As Long, SecurityLevel As Long, UserName As String) As Boolean

The LoadOptikaPage method syntax has these parts:

Part | Description
DocInfo | A valid DocInfo object. Refer to the DocInfo object topic for further information on this object type.
ViewerFlags | Defines the capabilities of the current control. This value is the sum of selected options (eg., 393434).
SecurityLevel | Defines the level of security for the document.
UserName | Identifies the current user to the control.

Returns

Boolean indicating success(True) or failure(False) of loading IBPM document page.

Remarks

The NextPage and PrevPage methods can be used to traverse IBPM document pages.

To ensure the removal of all files associated with viewing an IBPM page, the following flag should be passed into the LoadOptikaPage method as part of the ViewerFlags parameter. This will remove all files including the currently viewed document when the Viewer is closed.

optDelOnClose = 256 decimal (0x100 hex)

See the "Viewer Flags" section for additional information.

See also Appendix B - IBPM Toolkit Related Functionality


LockAnnotations - OptPage (Viewer)

Locks or unlocks annotations on the current page.

Syntax

C++

VARIANT_BOOL LockAnnotations(

VARIANT_BOOL Lock,

VARIANT_BOOL AllowDialog);

VB

Function LockAnnotations(Lock As Boolean, AllowDialog As Boolean) As Boolean

The LockAnnotations method syntax has these parts:

Part | Description
Lock | Lock (True) or Unlock (False) annotations.
AllowDialog | Determines whether the user receives the "Save Annotations?" dialog when bLock is True, or the "Can't Lock Annotations" dialog when bLock is False.

Returns

Boolean indicating success (True) or failure (False) of an annotation lock.

Remarks

LockAnnotations(True, …) is not necessary if the ActivateAnnotations property is set True. LockAnnotations(False, …) is only necessary if the application needs to save annotations on demand, otherwise, the "Save Annotations?" dialog is displayed when the current document is closed.

The LockAnnotations method can also be used to lock and unlock IBPM document pages. Once annotations have been added to an IBPM document page, using LockAnnotations allows the ability to unlock and save annotations to the IBPM system.

Lock | Allow Dialog | Method Return | Action
True | True | True | Annotation file will be locked, no message is displayed.
True | False | True | Annotation file will be locked, no message is displayed.
True | True | False | Annotation file is not locked, Can not Lock Annotations dialog is displayed.
True | False | False | Annotation file is not locked, no message is displayed.
False | True | True | Annotation file is unlocked, Save Annotation dialog is displayed if the document has been modified.
False | False | True | Annotation file is unlocked, no message is displayed. Annotations are saved if the document has been modified.
False | True | False | Annotation file is not unlocked, no message is displayed.
False | False | False | Annotation file is not unlocked, no message is displayed.

See also Appendix B - IBPM Toolkit Related Functionality (Viewer)


Move - OptPage (Viewer)

This stock method is documented in the MSDN library.

Moves an object.

Syntax

VB

Sub Move(Left As Single, [Top], [Width], [Height])

Parameters

The Move method syntax has these parts:

Part | Description
left | Required. Single-precision value indicating the horizontal coordinate (x-axis) for the left edge of object.
top | Optional. Single-precision value indicating the vertical coordinate (y-axis) for the top edge of object.
width | Optional. Single-precision value indicating the new width of object.
height | Optional. Single-precision value indicating the new height of object.

Remarks

Moving a control in a Frame is always relative to the origin (0,0), which is the upper-left corner. The coordinate system is always in twips.


NextPage - OptPage (Viewer)

Displays the next page in the document.

NextPage Example

Syntax

C++

VARIANT_BOOL NextPage();

VB

Function NextPage() As Boolean

Returns

Boolean

Remarks

If the last (or only) page in the document is currently displayed, calls to the NextPage method will return False. Use the IsNextPage method to determine if there is a next page, before calling NextPage.

This method can be used in conjunction with IBPM document pages. See LoadOptikaPage for more information.

See also Appendix B - IBPM Toolkit Related Functionality


PrevPage - OptPage (Viewer)

Displays the previous page in the document.

PrevPage Example

Syntax

C++

VARIANT_BOOL PrevPage();

VB

Function PrevPage() As Boolean

Returns

Boolean

Remarks

If the first (or only) page in the document is currently displayed, calls to the PrevPage method will return False. Use the IsPrevPage method to determine if there is a previous page, before calling PrevPage.

This method can be used in conjunction with IBPM document pages. See LoadOptikaPage for more information.

See also Appendix B - IBPM Toolkit Related Functionality


PromptSave - OptPage (Viewer)

Forces the "Save changes to Annotations" dialog box to be displayed if there are unsaved or modified annotations.

PromptSave Example

Syntax

C++

VARIANT_BOOL PromptSave();

VB

Function PromptSave() As Boolean

Returns

Boolean - True if the "Save" dialog box was displayed, else False.

Remarks

Use the PromptSave method to force the "Save" dialog box to be displayed at any time, if annotations have changed. Normally the dialog box is displayed when the control is closed. If there are no unsaved annotations, the dialog box will not be displayed and the method will return False.

See also Appendix B - IBPM Toolkit Related Functionality


Refresh - OptPage (Viewer)

The Refresh method forces the control to repaint the displayed page.

Refresh Example

Syntax

C++

void Refresh();

VB

Sub Refresh()

Remarks

Generally, the control automatically repaints the page when appropriate. However, there may be situations where this method is necessary, e.g., after programmatically moving the scrollbars.


RenderPage - OptPage (Viewer)

Low level call to render a page to a specific device context (hDC).

RenderPage Example

Syntax

Function RenderPage(hWnd As Long, hDC As Long, lLeft As Long, lTop As Long, lRight As Long, lBottom As Long, bEraseBackground As Boolean) As Boolean

Part | Description
hWnd | Handle of the window in which to render the page.
HDC | Handle of the device context in which to render the page.
nLeft | Left client coordinate of the window.
nTop | Top client coordinate of the window.
nRight | Right client coordinate of the window.
Bottom | Bottom client coordinate of the window.
bEraseBackground | Determines whether the client area should be erased before the page is rendered.

Returns

Boolean - True if the method succeeded, False if the method failed.

Remarks

This method renders the page inside of the client rectangle area using a "best fit" method. The page will be enlarged or reduced in order to paint the largest possible area of the destination device context. When using this advanced method, the visible property of the OptPage control is usually set to False.


SaveAnnots - OptPage (Viewer)

Forces all unsaved annotations to be saved.

SaveAnnots Example

Syntax

C++

VARIANT_BOOL SaveAnnots();

VB

Function SaveAnnots() As Boolean

Returns

Boolean - True if annotations were successfully saved, else False.

Remarks

Use the SaveAnnots method to force annotations to be saved. This inhibits the "Save changes to Annotations?" dialog. If there are no unsaved annotations, the method returns False. Use IsModified to determine if changed, unsaved annotations exist.

See also Appendix B - IBPM Toolkit Related Functionality


SaveAsFileType - OptPage (Viewer)

Saves the current page as the selected file type. Reserved for future use.

Syntax

C++

VARIANT_BOOL SaveAsFileType(

BSTR szFilePathAndName,

short sFileType,

long lSaveImage);

VB

Function SaveAsFileType(szFilePathAndName As String, sFileType As Integer, lSaveImage As Long) As Boolean

Returns

Boolean


SetFocus - OptPage (Viewer)

This stock method is documented in the MSDN library.

Moves the focus to the specified object.

Syntax

VB

Function SetFocus()


Setup - OptPage (Viewer)

Note: Reserved for future use.

Syntax

C++

VARIANT_BOOL Setup();

VB

Function Setup() As Boolean

Returns

Boolean


ShowWhatsThis - OptPage (Viewer)

This stock method is documented in the MSDN library.

Displays a selected topic in a Help file using the "What's This" popup provided by Windows Help.

Syntax

VB

Function ShowWhatsThis()


StartPrintJob - OptPage (Viewer)

Starts a custom print job.

Syntax

C++

VARIANT_BOOL StartPrintJob(OLE_HANDLE hDC);

VB

Function StartPrintJob(hDC As OLE_HANDLE) As Boolean

The StartPrintJob method syntax has these parts:

Part | Description
HDC | Active printer object device context.

Returns

Integer - 1 is success, zero is failure.

Remarks

The StartPrintJob method initiates a custom print session. The EndPrintJob method terminates a custom print session. Print properties for the custom print session can be defined by using the PrintProperties property. The custom print methods allow the application to display a custom dialog box to solicit print options.


UnloadPage - OptPage (Viewer)

Unloads the current document from the control.

UnloadPage Example

Syntax

C++

void UnloadPage();

VB

Sub UnloadPage()

Remarks

The UnloadPage method unloads the current document from the control, without closing or destroying the control.


ZOrder - OptPage (Viewer)

This stock method is documented in the MSDN library.

Places a specified object at the front or back of the z-order within its graphical level.

Syntax

VB

Sub ZOrder([position])

Parameters

The ZOrder method syntax has these parts:

Part | Description
position | Optional. Integer indicating the position of object relative to other instances of the same object. If position is 0 or omitted, object is positioned at the front of the z-order. If position is 1, object is positioned at the back of the z-order.

Returns

N/A


ActivateAnnotations - OptPage (Viewer)

Enables or disables annotation drawing on the current document.

ActivateAnnotations Example

Syntax

C++

VARIANT_BOOL ActivateAnnotations;

VB

ActivateAnnotations As Boolean

Data Type

Boolean - If True, the annotation toolbar is visible, if False, the annotation toolbar is removed.

Remarks

If the ActivateAnnotations property is set to false and the annotation toolbar is visible, the annotation toolbar is removed.

If the annotation toolbar is manually removed, the ActivateAnnotations property is set to false.

If the ActivateAnnotations property is set to true, the state of the KeepAnnotToolBarVisible property governs whether the annotation toolbar is displayed or not.

To draw annotations on a document using the annotation toolbar:

· Set the KeepAnnotToolBarVisible property to true.

· Set the ActivateAnnotations property to true.

To draw annotations on a document without using the annotation toolbar:

· Set the KeepAnnotToolBarVisible property to false.

· Set the ActivateAnnotations property to true.

· Use the ExecuteAnnotToolboxCmd method to draw annotations.


BorderStyle - OptPage (Viewer)

Sets or returns the border style of the control.

BorderStyle Example

Syntax

C++

short BorderStyle;

VB

BorderStyle As Integer

Data Type

Integer

Remarks

The BorderStyle property enables a dark line bordering the document page. Possible values are either on (1) or off (0).

This property is a standard ActiveX property and should not be confused with the OptPage ShowBorders property.


Capabilities - OptPage (Viewer)

Returns the render capabilities associated with a document view.

Capabilities Example

Syntax

C++

long Capabilities;

VB

Capabilities As Long

Data Type

Long - value containing the addition of each capability. Use the Visual Basic And operator with the appropriate RenderCapability constant to determine whether a specific capability is supported.

Remarks

Read-only property. Only certain capabilities are supported for each document view. See RenderCapability for a complete list of render capabilities. Use this property to determine whether certain features apply to the current document, e.g., rotation and scalability.


Caption - OptPage (Viewer)

Retrieves or sets the caption that is displayed in the control.

Caption Example

Syntax

C++

BSTR Caption;

VB

Caption As String

Data Type

String

Remarks

Can be used to store and retrieve text information from the control.


CauseValidation - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns/sets whether validation occurs on the control which lost focus.

Syntax

VB

CausesValidation As Boolean

Data Type

Integer (Boolean)


CenterZooms - OptPage (Viewer)

Determines how the viewer displays the page after a scale operation.

CenterZooms Example

Syntax

C++

VARIANT_BOOL CenterZooms;

VB

CenterZooms As Boolean

Data Type

Integer (boolean)

Remarks

This property controls how the viewer displays the document after the Zoom property (scaling) has been set. If CenterZooms property is True, then the viewer will keep the area being viewed as close to the center of the view space as possible. If CenterZooms property is False, the viewer will not center the area being viewed in the view space. Instead, it will zoom to the upper left of the page.


Container - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns the container of an object.

Syntax

VB

Property Container As Object

Data Type

Container

Remarks

Returns a pointer to a container of an object.


DataBindings - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns/sets a DataBindings collection object that collects the bindable properties that are available to the developer.

Syntax

VB

Property DataBindings As DataBindings


DisplayResolution - OptPage (Viewer)

Returns the resolution of the display in Dots Per Inch (DPI).

DisplayResolution Example

Syntax

C++

short DisplayResolution;

VB

DisplayResolution As Integer

Data Type

Integer

Remarks

Read-only property.


DragIcon - OptPage (Viewer)

This stock property is documented in the MSDN library.

Syntax

VB

Property DragIcon As StdPicture


DragMode - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns or sets a value that determines whether manual or automatic drag mode is used.

Syntax

VB

Property DragMode As Integer


Enabled - OptPage (Viewer)

Returns or sets the state of the control.

Enabled Example

Syntax

VB

Property Enabled As Boolean

Data Type

Boolean

Remarks

This property controls the operating state of the control. If Enabled is set to False, then the control will not receive focus, process mouse commands, or accept keyboard input. It cannot be resized, scrolled, or annotated. If Enabled is set to True, all normal methods are available.


ErrorID - OptPage (Viewer)

Returns the id value of a specific error when a load error occurs.

ErrorID Example

Syntax

C++

long ErrorID;

VB

ErrorID As Long

Data Type

Long

Remarks

Use the ID value that is provided by the ErrorID property to determine the reason for a load failure. See also ErrorMsg property.


ErrorMsg - OptPage (Viewer)

Returns the text message related to a specific error when a load error occurs.

ErrorMsg Example

Syntax

C++

BSTR ErrorMsg;

VB

ErrorMsg As String

[form.]object.ErrorMsg

Data Type

String

Remarks

The ErrorMsg Property which will return the error text message. See also ErrorID property.


FitSides - OptPage (Viewer)

Scales the document to fit the sides of the OptPage control. Write-only property.

FitSides Example

Syntax

VB

FitSides As Boolean

C++

VARIANT_BOOL FitSides;

Data Type

Boolean

Remarks

Write-only property. Affects the Scale property.


FitWindow - OptPage (Viewer)

Scales the document to fit entirely within the OptPage control.

FitWindow Example

Syntax

VB

FitWindow As Boolean

C++

VARIANT_BOOL FitWindow;

Data Type

Boolean

Remarks

Write-only property. Affects the Scale property by calculating a new scale factor based upon the size of the window containing the page.


Flags - OptPage (Viewer)

Note: This functionality is not yet available in the control.

Syntax

C++

long Flags;

VB

Flags As Long

Data Type

Long


GreenbarColor - OptPage (Viewer)

Returns or sets the displayed Greenbar to a user defined color.

GreenbarColor Example

Syntax

C++

OLE_COLOR GreenbarColor;

VB

GreenbarColor As OLE_COLOR

Data Type

OLE_COLOR - This can be derived using the RGB( ) method in Visual Basic.

Remarks

This property is used if enabled. To enable GreenbarLines set GreenbarLines to a positive value.


GreenbarLines - OptPage (Viewer)

Returns or sets the number of horizontal lines of text for the Greenbar to span (e.g., a single greenbar will span 3 lines if the property is set to 3).

GreenbarLines Example

Syntax

C++

short GreenbarLines;

VB

GreenbarLines As Integer

Data Type

Integer

Remarks

If the value is set to 0 GreenbarLines will be disabled. A positive value enables GreenbarLines.


Height - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns/sets the height of an object.

Syntax

VB

Property Height As Single

[form.]object.Height [= number]

Data Type

Single

Remarks

Use the Height, Width, Left, and Top properties for operations or calculations based on an object's total area, such as sizing or moving the object.


HelpContextID - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns or sets a context ID number for an object. Used to provide context-sensitive Help for your application.

Syntax

VB

Property HelpContextID As Long

Data Type

Long


HorzPageSize - OptPage (Viewer)

Returns the width of the displayed page in pixels.

HorzPageSize Example

Syntax

C++

short HorzPageSize(long lAtScale);

void HorzPageSize(

long lAtScale,

short rhs);

VB

Property HorzPageSize(lAtScale As Long) As Integer

Data Type

Integer

Remarks

The HorzPageSize property is the width of the entire page at the current scale factor, regardless of the width of the control. This property is read-only.


HorzScrollBarDisabled - OptPage (Viewer)

Returns or sets the state of the horizontal scrollbar.

HorzScrollBarDisabled Example

Syntax

C++

VARIANT_BOOL HorzScrollBarDisabled;

VB

HorzScrollBarDisabled As Boolean

Data Type

Integer (boolean)

Remarks

If set to False, the scrollbar is removed from the control.


HorzScrollOffset - OptPage (Viewer)

Returns or sets the current offset, in pixels, of the horizontal scrollbar.

HorzScrollOffset Example

Syntax

C++

short HorzScrollOffset;

VB

HorzScrollOffset As Integer

Data Type

Integer

Remarks

After this property is set, the page will not automatically redraw. Use the Refresh method to cause the control to redraw the page.


hWnd - OptPage (Viewer)

Returns the Window handle of the control.

hWnd Example

Syntax

C++

OLE_HANDLE hWnd;

VB

hWnd As OLE_HANDLE

Data Type

OLE_HANDLE (Long)

Remarks

The hWnd property can be used with Windows API calls.


Index - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns or sets the number that uniquely identifies an object in a collection or array.

Syntax

VB

Property Index As Integer

Data Type

Integer

Remarks

The Index property is set by default to the order of the creation of objects in a collection. The index for the first object in a collection will always be one. This property is read-only.


KeepAnnotToolBarOnTop - OptPage (Viewer)

Determines whether or not the annotation toolbar is always displayed on top of other windows.

KeepAnnotToolBarOnTop Example

Syntax

C++

VARIANT_BOOL KeepAnnotToolBarOnTop;

VB

KeepAnnotToolBarOnTop As Boolean

Data Type

Boolean

Remarks

Generally, set this property to true so that the annotation toolbar is never hidden by other windows. This property is equivalent to the WNDTOPMOST property for windows.


KeepAnnotToolBarVisible - OptPage (Viewer)

Determines whether or not the annotation toolbar is displayed when the ActivateAnnotations property is enabled.

KeepAnnotToolBarVisible Example

Syntax

C++

VARIANT_BOOL KeepAnnotToolBarVisible;

VB

KeepAnnotToolBarVisible As Boolean

Data Type

Boolean

Remarks

If the ActivateAnnotations property is set to true, the state of the KeepAnnotToolBarVisible property governs whether or not the annotation toolbar is displayed.


Left - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns or sets the distance between the internal left edge of an object and the left edge of its container.

Syntax

VB

Property Left As Single

Data Type

Single

Remarks

Use the Height, Width, Left, and Top properties for operations or calculations based on an object's total area, such as sizing or moving the object.


Name - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns the name used in code to identify an object.

Syntax

VB

Property Name As String

Data Type

String

Remarks

The default name for new objects is the kind of object plus a unique integer. For example, the first new OptPage object is OptPage1.


Object - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns the object and/or a setting of an object's method or property.

Syntax

VB

Property Object As Object

Data Type

Object


Orientation - OptPage (Viewer)

Returns or sets the current orientation.

Example

Syntax

C++

long Orientation;

VB

Orientation As Long

Data Type

Long

Remarks

Returns or sets the current orientation relative to the normal view of the page. The value set or returned is the number of degrees that the page is rotated (clockwise) from normal. Valid values are 0, 90, 180, 270. See also the Rotatable method. Use the Orientation property to position a document to a specific viewing angle, use RotatePage to position a document relative to its current angle.


PageComponents - OptPage (Viewer)

The PageComponent property is used to return the total number of components that comprise a page loaded in the OptPage ActiveX. The returned value can be used in a loop in conjunction with the values defined at the Component Types link.

Syntax

C++

long PageComponents;

VB

PageComponents As Long

Data Type

Long


PageCount - OptPage (Viewer)

The PageCount Property is a read only property that returns the number of pages in a document.

Syntax

C++

long PageCount;

VB

PageCount As Long

Data Type

Long

See also Appendix B - IBPM Toolkit Related Functionality


PageNumber - OptPage (Viewer)

Returns the current document page number.

PageNumber Example

Syntax

C++

long PageNumber;

VB

PageNumber As Long

Data Type

Long - Zero is returned if no pages exist.

Remarks

Read-only property. Also see the DisplayPage method.

See also Appendix B - IBPM Toolkit Related Functionality (Viewer)


Parent - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns the object on which this object is located.

Syntax

C++

VARIANT_BOOL IsPrevPage();

VB

Property Parent As Object

Data Type

Form

Remarks

Use the Parent property to access the properties, methods, or controls of an object's parent. This property is read-only.


PrimaryComponentIndex - OptPage (Viewer)

The PrimaryComponentIndex property is used to retrieve the index of the primary page component. This index can be used in conjunction with the EnumComponentTypes method to determine the actual component type or with the GetDisplayFileName method to determine the filename of the primary component.

Syntax

C++

long PrimaryComponentIndex;

VB

PrimaryComponentIndex As Long

Data Type

Long

Remarks

See also EnumComponentTypes method.

See also GetDisplayFileName method.


PrintProperties - OptPage (Viewer)

Returns or sets the current print properties.

PrintProperties Example

Syntax

C++

long PrintProperties;

VB

PrintProperties As Long

Data Type

Long

Remarks

Read-write property. The PrintProperties property is used to set print options. The print options remain in effect for all custom print jobs, or until reset. See the PrintProperty values for specific options.


Resolution - OptPage (Viewer)

Returns the current document resolution.

Resolution Example

Syntax

C++

short Resolution;

VB

Resolution As Integer

Data Type

Integer

Remarks

Read-only property. The Resolution property value is useful when mapping control (screen) coordinates to document coordinates.


Rotatable - OptPage (Viewer)

Returns whether or not the document page is rotatable (i.e., a Tiff file).

Rotatable Example

Syntax

C++

VARIANT_BOOL Rotatable;

VB

Rotatable As Boolean

Data Type

Boolean

Remarks

The Resolution property value is useful when mapping control (screen) coordinates to document coordinates. This property is read-only.


ShowAnnotations - OptPage (Viewer)

Determines whether or not annotations are displayed on the page.

ShowAnnotations Example

Syntax

C++

VARIANT_BOOL ShowAnnotations;

VB

ShowAnnotations As Boolean

Data Type

Integer (boolean) - If set to True the annotations will display, if set to False the annotations will not be displayed.

Remarks

Use this property to show and hide annotations on the page. Redactions will still be displayed if the redaction was applied by a user with a higher security level. See the Security Level Overview for further details.

See also Appendix B - IBPM Toolkit Related Functionality


ShowBorders - OptPage (Viewer)

Retrieves or sets whether the control outlines the page with a border.

ShowBorders Example

Syntax

C++

VARIANT_BOOL ShowBorders;

VB

ShowBorders As Boolean

[form.]object.ShowBorders

Data Type

Boolean

Remarks

Gives a visible indicator to the edges of a document page.


TabIndex - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns or sets the tab order of an object within its parent form.

Syntax

VB

Property TabIndex As Integer

Data Type

Integer


TabStop - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns or sets a value indicating whether the TAB key can be used to give the focus to an object.

Syntax

VB

Property TabStop As Boolean

Data Type

Boolean


Tag - OptPage (Viewer)

This stock property is documented in the MSDN library.

Stores any extra data needed for your program.

Syntax

VB

Property Tag As String


ToolTipText - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns or sets the text displayed when the mouse is paused over the control.

Syntax

VB

Property ToolTipText As String

Data Type

String


Top - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns or sets the distance between the internal top edge of an object and the top edge of its container

Syntax

VB

Property Top As Single

Data Type

Single

Remarks

Use the Height, Width, Left, and Top properties for operations or calculations based on an object's total area, such as sizing or moving the object.


UserToken - OptPage (Viewer)

The UserToken property sets a UserToken object. Use this property to set the UserToken object for the OptPage control.

Syntax

C++

HRESULT UserToken([in] LPDISPATCH UserToken)

VB

Property UserToken As Object (write-only)

Remarks

This method is reserved for future use.


VertPageSize - OptPage (Viewer)

Returns the height of the displayed page in pixels.

VertPageSize Example

Syntax

C++

short VertPageSize(long lAtScale);

VB

Property VertPageSize(lAtScale As Long) As Integer

Data Type

Integer

Remarks

The VertPageSize property is the height of the entire page at the current scale factor, regardless of the width of the control.


VertScrollBarDisabled - OptPage (Viewer)

Returns or sets the state of the vertical scrollbar.

VertScrollBarDisabled Example

Syntax

C++

VARIANT_BOOL VertScrollBarDisabled;

VB

VertScrollBarDisabled As Boolean

[form.]object.VertScrollBarDisabled

Data Type

Boolean

Remarks

If set to False, the scrollbar is removed from the control.


VertScrollOffset - OptPage (Viewer)

Returns or sets the current offset in pixels of the vertical scrollbar.

Syntax

C++

short VertScrollOffset;

VB

VertScrollOffset As Integer

Data Type

Integer

Remarks

After this property is set, the page will not automatically redraw. Use the Refresh method to cause the control to redraw the page.


Visible - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns/sets a value that determines whether an object is visible or hidden.

Syntax

VB

Property Visible As Boolean

Data Type

Boolean


WhatsThisHelpID - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns or sets an associated context number for an object.

Syntax

VB

Property WhatsThisHelpID As Long

Data Type

Long


Width - OptPage (Viewer)

This stock property is documented in the MSDN library.

Returns or sets the width of an object.

Syntax

VB

Property Width As Single

Data Type

Integer

Remarks

Use the Height, Width, Left, and Top properties for operations or calculations based on an object's total area, such as sizing or moving the object.


Zoom - OptPage (Viewer)

Returns or sets the current zoom factor.

Zoom Example

Syntax

C++

long Zoom;

VB

Zoom As Long

[form.]object.Zoom

Data Type

Long

Remarks

Valid values are in the range 10 - 400. The value represents the percentage relative to 100% of the displayed document size.


Annotation Type Constants

These constants are used to specify the annotation command to be executed with the ExecuteAnnotToolboxCmd method.

Constant | Value | Notes
optAnnotationNormal | 100 | Normal cursor.
optAnnotationLine | 101 | Line annotation.
optAnnotationHighlt | 102 | Highlight.
optAnnotationText | 103 | Text block annotation.
optAnnotationSticky | 104 | Sticky note annotation.
optAnnotationWhiteRedact | 105 | White redaction.
optAnnotationBlackRedact | 106 | Black redaction.


Page Overide Type Constants

Constant | Value | Notes
optAutoDetect | 0 |
optColdPage | 2 |
optImagePage | 1 |
optUniversalPage | 3 |


AboutBox Example - OptPage (Viewer)

This example displays the OptPage control About Box dialog window.

Private Sub mnuAboutControl_Click()

 Me.OptPage1.AboutBox

End Sub


ActivateAnnotations Example - OptPage (Viewer)

This example shows or hides the annotation toolbar depending on the current state of the ActivateAnnotations property.

Private Sub mnuAnnotate_Click()

  If Me.OptPage1.ActivateAnnotations Then

  Me.OptPage1.ActivateAnnotations = False

  Else

  Me.OptPage1.ActivateAnnotations = True

  End If

End Sub


AnnotationDown Example - OptPage (Viewer)

A save dialog is automatically called when the AnnotationDown event occurs and the page has been modified. This example demonstrates how additional events could be called. See LockAnnotations method for more details.

Private Sub OptPage1_AnnotationDown()

If OptPage1.IsModified() Then

MsgBox ("The page was modified so next you will be prompted to save.")

End If

End Sub


BorderStyle Example - OptPage (Viewer)

This example allows the border style to be turned on and off by clicking on a menu item.

Private Sub mnuViewSetBorder_Click()

If OptPage1.BorderStyle = 0 Then

OptPage1.BorderStyle = 1

mnuViewSetBorder.Checked = True

Else

OptPage1.BorderStyle = 0

mnuViewSetBorder.Checked = False

End If

End Sub


CalcVariableZoom Example - OptPage (Viewer)

This example zooms an area of the document and centers the area in the control.

Private Sub optpage1_DoRectangle(ByVal Left As Long, _

ByVal Top As Long, ByVal Right As Long, _

ByVal Bottom As Long, bEnableDefault As Long)

Dim lNewScale As Long

Dim iHorzOffset As Long

Dim iVertOffset As Long

' Rectangle coordinates are already scaled to 100%

' of the document - we don't need to adjust

lNewScale = optpage1.CalcVariableZoom(Left, Top, Right, _

Bottom, iHorzOffset, iVertOffset)

Let optpage1.Scale = lNewScale

Let optpage1.HorzScrollOffset = iHorzOffset

Let optpage1.VertScrollOffset = iVertOffset

SetScale

bEnableDefault = False ' Prevent control from processing

' rect and displaying popup menu

End Sub


Capabilities Example - OptPage (Viewer)

This example retrieves the Capabilities property for the current document, then uses the property to set the enabling or disabling of Rotate and Scale buttons. This example is taken from the MDIAPP sample application.

Public Sub SetPageOptions()

Dim cap As Integer

cap = optpage1.Capabilities

btnPrint.Picture = imgPrintEnabled.Picture

btnPrint.Enabled = True

If (cap And optScaleable) > 0 Then

 btnZoomIn.Picture = imgZoomInEnabled.Picture

 btnZoomOut.Picture = imgZoomOutEnabled.Picture

 btnZoomIn.Enabled = True

 btnZoomOut.Enabled = True

 cboZoom.Enabled = True

 cboZoom = optpage1.Scale

Else

 btnZoomIn.Picture = imgZoomInDisabled.Picture

 btnZoomOut.Picture = imgZoomOutDisabled.Picture

 btnZoomIn.Enabled = False

 btnZoomOut.Enabled = False

 cboZoom.Enabled = False

 cboZoom = optpage1.Scale

End If

If (cap And optRotate) > 0 Then

 btnRotateLeft.Picture = imgRotateLeftEnabled.Picture

 btnRotateRight.Picture = imgRotateRightEnabled.Picture

 btnRotateLeft.Enabled = True

 btnRotateRight.Enabled = True

Else

 btnRotateLeft.Picture = imgRotateLeftDisabled.Picture

 btnRotateRight.Picture = imgRotateRightDisabled.Picture

 btnRotateLeft.Enabled = False

 btnRotateRight.Enabled = False

End If

End Sub


Caption Example - OptPage (Viewer)

This example retrieves the Caption property of the control and uses this to set the caption property of the parent form.

Private Sub btnReload_Click()

Me.ActiveForm.optpage1.UnloadPage

If iSaveOpenType = gcOpenDoc Then

 Me.ActiveForm.LoadDoc sSaveFilename, iSaveFileType

Else

 Me.ActiveForm.LoadAdvanced sSaveFilename, iSaveFileType

End If

Me.caption = Me.ActiveForm.OPTPAGE1.caption

End Sub


CenterZooms Example - OptPage (Viewer)

This example sets the CenterZooms property based on the value of a command button.

Private Sub btnCenterZoom_Click(Value As Integer)

Let Me.ActiveForm.optpage1.CenterZooms = Value

End Sub


ControlGotFocus, ControlLostFocus Example - OptPage (Viewer)

This example uses the ControlGotFocus and ControlLostFocus events to hide annotations when a page gets focus, and shows annotations when the control loses focus.

Private Sub optpage1_ControlGotFocus(ByVal hWndOld As Integer)

optpage1.ShowAnnotations = False

End Sub

Private Sub optpage1_ControlLostFocus(ByVal hWndNew As Integer)

optpage1.ShowAnnotations = True

End Sub


DisplayPage Example - OptPage (Viewer)

This example retrieves the current page number, then invokes the IsNextPage method to determine if there is a next page in the document. If there is, the DisplayPage method is called with the next page number. Also see the NextPage method.

Public Sub mnuNextPage_Click()

Dim CurrentPage As Long

Dim lReturn As Long

CurrentPage = optpage1.PageNumber

If optpage1.IsNextPage Then

lReturn = optpage1.DisplayPage(CurrentPage + 1)

End If

End Sub


DisplayResolution Example - OptPage (Viewer)

This example displays the DisplayResolution property and the Resolution property values.

Private Sub optpage1_DoDblClick(ByVal Button As Integer, _

 ByVal Keys As Integer, ByVal X As Single, _

 ByVal Y As Single, bEnableDefault As Integer)

 MsgBox "DisplayResolution Property is " & _

     optpage1.DisplayResolution

 MsgBox "Resolution Property is " & optpage1.Resolution

End Sub


DoDblClick Example - OptPage (Viewer)

This example demonstrates how to process a DoDblClick event in the control. This code simply displays a message box.

Private Sub optpage1_DoDblClick(ByVal Button As Integer, _

ByVal Keys As Integer, ByVal X As Single, _

ByVal Y As Single, EnableDefault As Integer)

MsgBox("Double Clicked")

End Sub


DoMouseDown, DoMouseMove, DoMouseUp Example - OptPage (Viewer)

This example uses the DoMouseDown , DoMouseMove and DoMouseUp events to display a message or change the mousepointer.

Private Sub OptPage1_DoMouseDown(ByVal Button As Integer, ByVal

Keys As Integer, ByVal X As Single, ByVal Y As Single,

EnableDefault As Integer)

If Button = vbLeftButton Then MsgBox ("LeftButton Pressed")

End Sub

Private Sub OptPage1_DoMouseMove(ByVal Button As Integer, ByVal

Keys As Integer, ByVal X As Single, ByVal Y As Single,

EnableDefault As Integer)

If Button = vbRightButton Then Screen.MousePointer =

 vbSizePointer

End Sub

Private Sub OptPage1_DoMouseUp(ByVal Button As Integer, ByVal Keys

As Integer, ByVal X As Single, ByVal Y As Single,

EnableDefault As Integer)

Screen.MousePointer = vbNormalPointer

End Sub


DoNextPage, DoPrevPage Example - OptPage (Viewer)

This example uses the DoNextPage and DoPrevPage events to maintain the current page number on a form.

Private Sub optpage1_DoNextPage(ByVal NextPageNumber As Long, _

bEnableDefault As Integer)

txtPageNumber.Text = NextPageNumber

End Sub

Private Sub optpage1_DoPrevPage(ByVal PrevPageNumber As Long, _

bEnableDefault As Integer)

txtPageNumber.Text = PrevPageNumber

End Sub


DoPageChanged Example - OptPage (Viewer)

This example displays a debug message when the PageChanged event is called.

Private Sub optpage1_DoPageChanged()

Static iChangeNumber As Integer

iChangeNumber = iChangeNumber + 1

Debug.Print "DoPageChanged" & iChangeNumber

End Sub


DoRectangle Example - OptPage (Viewer)

This example calls the CalcVariableZoom method with the rectangle coordinates provided by the event.

Private Sub optpage1_DoRectangle(ByVal Left As Single, _

ByVal Top As Single, ByVal Right As Single, _

ByVal Bottom As Single, EnableDefault As Integer)

Dim lNewScale As Long

Dim iHorzOffset As Integer

Dim iVertOffset As Integer

' Rectangle coordinates are scaled to already scaled to 100%

' of the document so we don't need to adjust

lNewScale = optpage1.CalcVariableZoom(Left, Top, _

Right, Bottom, iHorzOffset, iVertOffset)

Let optpage1.Scale = lNewScale

Let optpage1.HorzScrollOffset = iHorzOffset

Let optpage1.VertScrollOffset = iVertOffset

SetScale

EnableDefault = False 'Prevent control from processing rect.

Sub


DoSelectPage Example - OptPage (Viewer)

This example prohibits the display of any page beyond page 2 in the document.

Private Sub optpage1_DoSelectPage( _

  ByVal SelectedPageNumber As Long, _

  EnableDefault As Integer)

 If SelectedPageNumber > 2 Then

  EnableDefault = False

 End If

End Sub


DoZoom Example - OptPage (Viewer)

This example uses the ZoomPercent parameter to update a combo box control when the scale factor changes.

Private Sub optpage1_DoZoom(ByVal ZoomPercent As Integer, _

  EnableDefault As Integer)

 frmMDIParent.cboZoom = ZoomPercent

End Sub


DragDrop - OptPage (Viewer)

NOTE: This functionality in not yet available in the control.

Occurs when a drag-and-drop operation is completed as a result of dragging and releasing the mouse button or using the Drag method with its action argument set to 2 (Drop).

Syntax

VB

Event DragDrop(Source As Control, X As Single, Y As Single)

Parameters

The DragDrop event syntax has these parts:

Part | Description
source | The control being dragged.
x | Horizontal position of mouse.
y | Vertical position of mouse.


Enabled Example - OptPage (Viewer)

This example toggles the Enabled property of the current OptPage control.

Private Sub btnEnable_Click()

' Toggle the Enabled property

'

Let Me.ActiveForm.OPTPAGE1.Enabled = _

Not Me.ActiveForm.OPTPAGE1.Enabled

' Set the Enable button caption to the opposite of the current

' Enabled property

'

If Me.ActiveForm.OPTPAGE1.Enabled = True Then

btnEnable.caption = "Disable"

Else

btnEnable.caption = "Enable"

End If

End Sub


ErrorID, ErrorMsg Example - OptPage (Viewer)

This example uses ErrorID and ErrorMsg to retrieve the error text when a load error has occurred.

Private Sub Command1_Click()

Dim sAppName As String

Dim lRefIdType As Integer

Dim sRefId As String

Dim lSecurityLevel As Long

Dim lFlags As Long

Dim sUserName As String

sAppName = ""

lRefIdType = 1

sRefId = "c:\wxyz.abc"

lFlags = 218

lSecurityLevel = 9

sUserName = ""

lreturnval = optpage1.LoadObject(sAppName, lRefIdType, sRefId,

lFlags, lSecurityLevel, sUserName)

If lreturnval = 0 Then

Dim sMsg As String

sMsg = "Error ID: " & CStr(optpage1.ErrorID)

sMsg = sMsg & ", Error Message: " & optpage1.ErrorMsg

MsgBox sMsg

End If

End Sub


ExecuteAnnotToolboxCMD Example - OptPage (Viewer)

This example demonstrates the use of the ExecuteAnnotToolboxCMD method to create a Highlight annotation on a document. Other annotation types are similar. See the Annotation Type Constants constants.

' Code attached to buttons for each annotation type

'

Private Sub btnHighlt_Click(Value As Integer)

DoAnnotationCmd Me.ActiveControl, optAnnotationCmdHighlt

End Sub

' Activate annotations (KeepAnnotationToolBarVisible is already

' False), then execute the command.

'

Private Sub DoAnnotationCmd(button As Control, cmd As Integer)

If button.Value = True Then

 Me.ActiveForm.optpage1.ActivateAnnotations = True

 If Not Me.ActiveForm.optpage1.ExecuteAnnotToolboxCmd(cmd) Then

  MsgBox "ExecuteAnnotToolboxCMD failed: " & _

 Me.ActiveForm.optpage1.ErrorID & " " & _

 Me.ActiveForm.optpage1.ErrorMsg

 End If

 gAnnoType = cmd

End If

SetColorsButton

End Sub

' Set the Colors command button sensitive for certain types only.

'

Public Sub SetColorsButton()

If btnHighlt.Value = True Or _

btnText.Value = True Or _

btnLine = True Then

 btnColors.Enabled = True

Else

 btnColors.Enabled = False

End If

End Sub


FitSides Example - OptPage (Viewer)

This example sets the FitSides property to True.

Private Sub btnFitSides_Click()

Me.OptPage1.FitSides = True

End Sub


FitWindow Example - OptPage (Viewer)

This example sets the FitWindow property to True.

Private Sub btnFitWindow_Click()

Me.ActiveForm.optpage1.FitWindow = True

End Sub


GetDisplayFileName Example - OptPage (Viewer)

Returns a string describing the filename and path of the document currently loaded into the control.

This example first determines the primary index of the document currently loaded into the control, then uses the GetDisplayFileName method to display the actual filename of the loaded document.

Private Sub mnuGetInfo_Click()

Dim PageName As String

Dim PrimaryIndex As Integer

PrimaryIndex = OptPage1.PrimaryComponentIndex

PageName = OptPage1.GetDisplayFileName(PrimaryIndex)

MsgBox (PageName)

End Sub


GetPageDescription Example - OptPage (Viewer)

This example displays a messagebox containing the page description by using the GetPageDescription method.

Private Sub mnuGetInfo_Click()

Dim PageDescr As String

PageDescr = OptPage1.GetPageDescription

MsgBox (PageDescr)

End Sub


GreenbarColor Example - OptPage (Viewer)

This example displays a color select common dialog. It then assigns the selected color as the color used by the Greenbar.

Private Sub mnuViewGreenbarColor_Click()

dlgCommonDialog.ShowColor 'Display common dialog box.

Me.ActiveForm.OptPage1.GreenbarColor = dlgCommonDialog.Color

End Sub


GreenbarLines Example - OptPage (Viewer)

This example allows Greenbar lines spanning 3 horizontal lines of text to be displayed on the document page.

Private Sub mnuViewGreenbar_Click()

If mnuViewGreenbar.Checked = False Then

Me.ActiveForm.OptPage1.GreenbarLines = 3

mnuViewGreenbar.Checked = True

Else

Me.ActiveForm.OptPage1.GreenbarLines = 0

mnuViewGreenbar.Checked = False

End If

End Sub


HorzPageSize, VertPageSize Example - OptPage (Viewer)

This example retrieves and displays the current HorzPageSize and VertPageSize properties.

Public Sub DisplayPageProperties()

Dim lHorzPageSize As Long

Dim bHorzScrollBarDisabled As Boolean

Dim iHorzScrollOffset As Integer

Dim lVertPageSize As Long

Dim bVertScrollBarDisabled As Boolean

Dim iVertScrollOffset As Integer

Dim msg As String

Let lHorzPageSize = optpage1.HorzPageSize

Let bHorzScrollBarDisabled = optpage1.HorzScrollBarDisabled

Let iHorzScrollOffset = optpage1.HorzScrollOffset

Let lVertPageSize = optpage1.VertPageSize

Let bVertScrollBarDisabled = optpage1.VertScrollBarDisabled

Let iVertScrollOffset = optpage1.VertScrollOffset

msg = "HorzPageSize = " & lHorzPageSize & Chr(13)

msg = msg + "HorzScrollBarDisabled = " & _

bHorzScrollBarDisabled & Chr(13)

msg = msg + "HorzScrollOffset = " & iHorzScrollOffset & Chr(13)

msg = msg & Chr(13)

msg = msg + "vertPageSize = " & lVertPageSize & Chr(13)

msg = msg + "vertScrollBarDisabled = " & _

bVertScrollBarDisabled & Chr(13)

msg = msg + "vertScrollOffset = " & iVertScrollOffset & Chr(13)

MsgBox msg

End Sub


HorzScrollBarDisabled, VertScrollBarDisabled Example - OptPage (Viewer)

This example moves the displayed page by 10% of the page size if the scroll bars are not disabled.

Public Sub MovePage()

If Not optpage1.HorzScrollBarDisabled Then

 optpage1.HorzScrollOffset = _

optpage1.HorzScrollOffset + (optpage1.HorzPageSize / 10)

End If

If Not optpage1.VertScrollBarDisabled Then

 optpage1.VertScrollOffset = _

optpage1.VertScrollOffset + (optpage1.VertPageSize / 10)

End If

End Sub


HorzScrollOffset, VertScrollOffset Example - OptPage (Viewer)

This example uses the HorzScrollOffset - OptPage (Viewer) and VertScrollOffset values returned from the CalcVariableZoom method to center the rescaled document.

Private Sub optpage1_DoRectangle(ByVal Left As Integer, _

ByVal Top As Integer, ByVal Right As Integer, _

ByVal Bottom As Integer, bEnableDefault As Integer)

Dim lNewScale As Long

Dim iHorzOffset As Integer

Dim iVertOffset As Integer

' Rectangle coordinates are scaled to already scaled to

' 100% of the document - we don't need to adjust

lNewScale = optpage1.CalcVariableZoom(Left, Top, Right, _

Bottom, iHorzOffset, iVertOffset)

Let optpage1.Scale = lNewScale

Let optpage1.HorzScrollOffset = iHorzOffset

Let optpage1.VertScrollOffset = iVertOffset

SetScale

bEnableDefault = False ' Prevent control from processing rect.

End Sub

This example uses the HorzScrollOffset and VertScrollOffset properties to move the page by 10% of the page size.

Public Sub MovePage()

If Not optpage1.HorzScrollBarDisabled Then

 optpage1.HorzScrollOffset = _

optpage1.HorzScrollOffset + (optpage1.HorzPageSize / 10)

End If

If Not optpage1.VertScrollBarDisabled Then

 optpage1.VertScrollOffset = _

optpage1.VertScrollOffset + (optpage1.VertPageSize / 10)

End If

End Sub


hWnd Example - OptPage (Viewer)

This example retrieves the hWnd property from the control then passes it to the Windows API function ClientToScreen to position a form at the position of the mouse.

Private Sub optpage1_DoMouseDown(ByVal Button As Integer, _

ByVal Keys As Integer, ByVal x As Single, _

ByVal y As Single, bEnableDefault As Integer)

Dim Here As POINTAPI

Here.x = x

Here.y = y

ClientToScreen optpage1.hWnd, Here

frmCapabilities.Top = Here.y + frmMDIParent.Top + 1750

frmCapabilities.Left = Here.x + frmMDIParent.Left + 100

frmCapabilities.Show

bEnableDefault = False 'Prevent control from processing event

End Sub


IsModified Example - OptPage (Viewer)

This example automatically saves annotations when the annotation toolbar is closed. See LockAnnotations for more details.

Private Sub optpage1_AnnotationDown()

If optpage1.IsModified() Then

 If Not optpage1.LockAnnotations(False, False) Then

 MsgBox "Can't unlock annotations!"

 End If

End If

End Sub

This example

The following is already automatically done.

Private Sub mnuExit_Click()

If OptPage1.IsModified Then

OptPage1.PromptSave

End If

Unload Me

End

End Sub


IsNextPage, IsPrevPage Example - OptPage (Viewer)

This example uses the IsNextPage and IsPrevPage methods to appropriately set the sensitivity (enabled or disabled) and background bitmaps of the NextPage and PrevPage command buttons.

Public Sub SetPageOptions()

If optpage1.IsNextPage Then

 frmMDIParent.btnNextPage.Picture = _

frmMDIParent.imgNextPageEnabled.Picture

 frmMDIParent.btnNextPage.Enabled = True

 mnuNextPage.Enabled = 1

Else

 frmMDIParent.btnNextPage.Picture = _

frmMDIParent.imgNextPageDisabled.Picture

 frmMDIParent.btnNextPage.Enabled = False

 mnuNextPage.Enabled = 0

End If

If optpage1.IsPrevPage Then

 frmMDIParent.btnPrevPage.Picture = _

frmMDIParent.imgPrevPageEnabled.Picture

 frmMDIParent.btnPrevPage.Enabled = True

 mnuPreviouspage.Enabled = 1

Else

 frmMDIParent.btnPrevPage.Picture = _

frmMDIParent.imgPrevPageDisabled.Picture

 frmMDIParent.btnPrevPage.Enabled = False

 mnuPreviouspage.Enabled = 0

End If

End Sub


KeepAnnotToolBarOnTop Example - OptPage (Viewer)

This example enables the KeepAnnotToolBarOnTop - OptPage (Viewer) property to force the annotation toolbar to display on top of all other windows.

Private Sub Form_Load()

Let optpage1.ShowAnnotations = True

Let optpage1.KeepAnnotToolBarVisible = True

Let optpage1.KeepAnnotToolBarOnTop = True

End Sub


KeepAnnotToolBarVisible Example - OptPage (Viewer)

This example enables the KeepAnnotToolBarVisible property to force the continued display of the annotation toolbar.

Private Sub Form_Load()

Let optpage1.ShowAnnotations = True

Let optpage1.KeepAnnotToolBarVisible = True

End Sub


KeyDown, KeyUp Example - OptPage (Viewer)

This example zooms the control if a "+" or "-" keystroke is detected.

Private Sub OptPage1_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyAdd Then

OptPage1.Zoom = OptPage1.Zoom + 10

If KeyCode = vbKeySubtract Then

OptPage1.Zoom = OptPage1.Zoom - 10

SetPageOptions

End Sub


KeyPress Example - OptPage (Viewer)

This example zooms the control if a "+" or "-" keystroke is detected.

Private Sub optpage1_KeyPress(KeyAscii As Integer)

If Chr(KeyAscii) = "+" Then

Let OptPage1.Zoom = OptPage1.Zoom + 10

Else

If Chr(KeyAscii) = "-" Then

Let OptPage1.Zoom = OptPage1.Zoom - 10

End If

End If

End Sub


Launch Example - OptPage (Viewer)

This example launches an application for the current document.

Private Sub btnLaunch_Click()

Dim iReturn As Integer

iReturn = Me.ActiveForm.optpage1.Launch

MsgBox "Launch returned " & iReturn

End Sub


NextPage, PrevPage Example - OptPage (Viewer)

This example shows how to navigate through a document using the NextPage and PrevPage methods.

Public Sub mnuNextPage_Click()

If optpage1.IsNextPage Then

 optpage1.NextPage

End If

End Sub

Public Sub mnuPreviousPage_Click()

If optpage1.IsPrevPage Then

  optpage1.PrevPage

 End If

End Sub


Stellent Viewer Toolkit Programmer's Reference

IBPM Viewer Toolkit Programmer's Reference

Constants | Events
Annotation Type Constants | AnnotationDown
Page Overide Type Constants | ControlGotFocus
 | ControlLostFocus
Properties | DoDblClick
ActivateAnnotations | DoMouseDown
BorderStyle | DoMouseMove
Capabilities | DoMouseUp
Caption | DoNextPage
CausesValidation | DoPageChanged
CenterZooms | DoPrevPage
Container | DoRectangle
DataBindings | DoSaveAnnots
DisplayResolution | DoSelectPage
DragIcon | DoZoom
DragMode | DragOver
Enabled | GotFocus
ErrorID | KeyDown
ErrorMsg | KeyPress
FitSides | KeyUp
FitWindow | LostFocus
Flags | SaveSetup
GreenbarColor | Validate
GreenbarLines |
Height | Methods
HelpContextID | AboutBox
HorzPageSize | AutoLoadMimeType
HorzScrollBarDisabled | AutoLoadPage
HorzScrollOffset | AutoPrintPage
HWnd | CalcVariableZoom
Index | DisplayPage
KeepAnnotToolBarOnTop | DoAlignment
KeepAnnotToolBarVisible | DoPrefsDlg
Left | DoPrintDlg
Name | Drag
Object | EndPrintJob
Orientation | EnumComponentTypes
PageComponents | ExecuteAnnotProperty
PageCount | ExecuteAnnotToolboxCmd
PageNumber | GetDisplayFileName
Parent | GetPageDescription
PrimaryComponentIndex | IsModified
PrintProperties | IsNextPage
Resolution | IsPrevPage
Rotatable | Launch
ShowAnnotations | LoadOptikaPage
ShowBorders | LockAnnotations
TabIndex | Move
TabStop | NextPage
Tag | PrevPage
ToolTipText | PromptSave
Top | Refresh
UserToken | RenderPage
VertPageSize | SaveAnnots
VertScrollBarDisabled | SaveAsFileType
VertScrollOffset | SetFocus
Visible | Setup
WhatsThisHelpID | ShowWhatsThis
Width | StartPrintJob
Zoom | UnloadPage
 | ZOrder
Overviews |
Annotations Overview |
Security Level Overview |
Appendix A - IBPM Toolkit Integration Overview (Viewer) |


Orientation Example - OptPage (Viewer)

This example uses the Orientation property to "flip" a page, i.e., turn it 180 degrees. See also the Rotatable method.

Private Sub mnuRotate_Click()

Dim iOrientation As Integer

iOrientation = OptPage1.Orientation

iOrientation = iOrientation + 90

If iOrientation > 270 Then

iOrientation = 0

End If

OptPage1.Orientation = iOrientation

End Sub


PageNumber Example - OptPage (Viewer)

This example uses the PageNumber property to update a text field with the current page number after NextPage and PrevPage methods. This example is taken from the MDIAPP sample application.

Public Sub mnuNextPage_Click()

If optpage1.IsNextPage Then

optpage1.NextPage

SetPageOptions

frmMDIParent.lblPageNum = optpage1.PageNumber

End If

End Sub

Public Sub mnuPreviousPage_Click()

If optpage1.IsPrevPage Then

optpage1.PrevPage

SetPageOptions

frmMDIParent.lblPageNum = optpage1.PageNumber

End If

End Sub


PrintProperties Example - OptPage (Viewer)

This example retrieves and displays the current value of the PrintProperties property.

Public Sub fPrintProperties()

 Dim lProps As Long

 Dim msg As String

 lProps = Me.ActiveForm.optpage1.PrintProperties

 msg = "PrintAnnotations = "

 If (lProps And optPrintAnnotations) > 0 Then

  msg = msg & "True "

 Else

  msg = msg + "False "

 End If

 msg = msg & ", Shrink to fit = "

 If (lProps And optPrintShrinkToFit) > 0 Then

  msg = msg & " True"

 Else

  msg = msg & " False"

 End If

 MsgBox msg

End Sub


PrintProperty - OptPage (Viewer)

These values are used with the PrintProperties property to set specific print options.

Value | Notes
1 | Print associated annotations.
2 | Shrink document page to fit print page.


PromptSave Example - OptPage (Viewer)

This example forces the "Save changes to Annotations?" dialog box to be displayed when the annotation toolbar is closed.

Private Sub optpage1_AnnotationDown()

 If optpage1.PromptSave() Then

  Debug.Print "Prompted to save Annotations "

 Else

  Debug.Print "Not prompted to save Annotations"

 End If

End Sub


Refresh Example - OptPage (Viewer)

This example uses the HorzScrollOffset and VertScrollOffset properties to move the page by 10%, then calls the Refresh method to repaint the control.

Public Sub MovePage()

If Not optpage1.HorzScrollBarDisabled Then

optpage1.HorzScrollOffset = _

optpage1.HorzScrollOffset + (optpage1.HorzPageSize / 10)

End If

If Not optpage1.VertScrollBarDisabled Then

optpage1.VertScrollOffset = _

optpage1.VertScrollOffset + (optpage1.VertPageSize / 10)

End If

optpage1.Refresh

End Sub

The following does a simple refresh, but there isn’t much reason to do it this way.

Private Sub OptPage1_DoDblClick(ByVal Button As Integer, ByVal

Keys As Integer, ByVal X As Single, ByVal Y As Single, EnableDefault As Integer)

OptPage1.Refresh

End Sub


RenderCapability - OptPage (Viewer)

These constants describe the capabilities of the current document. They are used with the Capabilities property.

Value | Notes
1 | This page is capable of text search.
2 | copy to clipboard text
4 | copy to clipboard bitmap
8 | rotation
16 | annotations
32 | being scaled
64 | handling multiple page documents
128 | Reserved
256 | displaying color
512 | displaying color
1024 | having a local setup dialog
2048 | internal use only
4096 | logging into databases
8192 | Reserved
16384 | Uses alternate annotation storage mechanism. See the GETSTART.WRI write file for more information on annotation storage.
32768 | reserved for internal use only
65536 | allowing exporting


RenderPage Example - OptPage (Viewer)

Private Sub Picture1_Paint()

Dim b As Boolean

'Render the page to a picture control,

'setting the EraseBackground flag to True

b = optpage1.RenderPage(Picture1.hWnd, Picture1.hDC, 0, 0, Picture1.Width, Picture1.Height, True)

End Sub


Resolution Example - OptPage (Viewer)

This example displays the DisplayResolution and the Resolution property values.

Private Sub optpage1_DoDblClick(ByVal Button As Integer, _

  ByVal Keys As Integer, ByVal X As Single, _

  ByVal Y As Single, bEnableDefault As Integer)

MsgBox "DisplayResolution Property is " & _

  optpage1.DisplayResolution

MsgBox "Resolution Property is " & optpage1.Resolution

End Sub


Rotatable Example - OptPage (Viewer)

This example demonstrates how a function can check to see if the document page is rotatable, and if so, to enable a menu or toolbar button to do so.

Private Sub SetPageOptions()

If OptPage1.Rotatable Then

mnuRotate.Enabled = True

tbToolBar.Buttons(3).Enabled = True

Else

mnuRotate.Enabled = False

tbToolBar.Buttons(3).Enabled = False

End If

End Sub


SaveAnnots Example - OptPage (Viewer)

This example forces annotations to be saved when the annotation toolbar is closed.

Private Sub optpage1_AnnotationDown()

 If optpage1.SaveAnnots() Then

  Debug.Print "Annotations saved"

 Else

  Debug.Print "Annotations not saved"

 End If

End Sub


ShowAnnotations Example - OptPage (Viewer)

This example toggles the state of the ShowAnnotations property.

Private Sub btnShowHideAnno_Click()

Me.OptPage1.ShowAnnotations = _

Not Me.OptPage1.ShowAnnotations

End Sub


ShowBorders Example - OptPage (Viewer)

This example toggles the value of the ShowBorders property and displays the current value.

Private Sub Form_Load()

Let optpage1.ShowAnnotations = True

optpage1.UserEnableLocators (True)

Let optpage1.CenterZooms = True

Let optpage1.AnnotationLockingEnabled = True

 Let optpage1. = Not _

optpage1.

MsgBox " is currently " & _

optpage1.

frmMDIParent.lblPageNum = 1

End Sub


UnloadPage Example - OptPage (Viewer)

This example "refreshes" the current document. It first unloads the current document, then reloads the same document. Variables iSaveOpenType, sSaveFilename, and iSaveFileType were stored when the document was originally loaded. The LoadDoc and LoadAdvanced functions invoke the appropriate Load method for the document.

Private Sub btnReload_Click()

Me.ActiveForm.OPTPAGE1.UnloadPage

If iSaveOpenType = gcOpenDoc Then

 Me.ActiveForm.LoadDoc sSaveFilename, iSaveFileType

Else

 Me.ActiveForm.LoadAdvanced sSaveFilename, iSaveFileType

End If

End Sub


Using an Application Defined ToolBar

It may be appropriate for an application to provide its own toolbar, possibly to limit the types of annotations available to the user. The Viewer control provides access to the ExecuteAnnotToolboxCmd method to allow the application to specify the annotation type, with the Viewer control handling the actual placement and drawing of the annotations.

To use an application specific toolbar:

1. Set the toolbar display policy, using the KeepAnnotToolBarVisible property (set to False).

2. Activate annotations using the ActivateAnnotations property (set to True).

3. Display the available annotation types using buttons, a menu, or other means.

4. For each annotation selected by the user, call the ExecuteAnnotToolboxCmd method with the appropriate command constant (see Annotation Type Constants . At this point the cursor is changed to a cross-hair and the user can draw the annotation. To return the normal cursor, call the ExecuteAnnotToolboxCmd method with the command set to the Annotation Type Constants .

5. Save the annotations. The application can force annotations to be saved by using the LockAnnotations method (only if AnnotationLockingEnabled is set to True). Otherwise, the user will be prompted to save the annotations when the toolbar is closed or the document is closed.

Return to Annotations OverviewAnnotations_Overview_OptPage_Viewer


Using the Annotations API

It may be necessary to programmatically draw annotations. To do this, the low-level Create annotation method can be called directly.

To use the Annotation API:

1. Lock annotations using the LockAnnotations method or the ActivateAnnotations property (set to True).

2. Determine the placement and size of the annotation. This can be fixed, determined at run-time, or captured as the result of a DoRectangle .

3. Call the Create Annotation method to draw the annotation.

4. Save the annotations. The application can force annotations to be saved by using the LockAnnotations method (only if AnnotationLockingEnabled is set to True). Otherwise, the user will be prompted to save the annotations when the document is closed.

Return to Annotations Overview


Using the Built-In Annotation ToolBar

The Viewer control supplies a toolbar that displays icons for each annotation type. This method is the simplest way for the application to enable annotations.

To use the built-in Annotation ToolBar:

1. Set the toolbar display method (behavior of the toolbar while floating), using the KeepAnnotToolBarVisible property (set to True) and the KeepAnnotToolBarOnTop property.

2. Display the toolbar using the ActivateAnnotations property (set to True to show, False to hide). Once displayed, the user can select the appropriate annotation types and draw them directly on the document page.

3. Save the annotations. The application can force annotations to be saved by using the SaveAnnots method. Otherwise, the user will be prompted to save the annotations when the toolbar is closed or the document is closed.

Return to Annotations Overview


ViewerFlag - OptPage (Viewer)

These constants are used to specify the ViewerFlags parameter to the Load methods

(AutoLoadPage, AutoPrintPage, LoadOptikaPage).

Value | Notes
1 | Reserved
2 | Reserved
4 | Reserved
8 | Reserved
16 | Establish a user as annotation administrator for a particular application. User must have Modify rights to be an annotation administrator.
32 | Reserved
64 | Allows the user to add or modify annotations.
128 | Reserved
256 | Deletes the currently viewed file when it is closed.
512 | Disables the ability to Print.
1024 | Disables the ability to Fax.
2048 | Disables Export Capability
4096 | Reserved
8192 | Disable the Overlay
16384 | Reserved
32768 | Reserved
65536 | Enables Stamp Administration
131072 | Enables Black Redaction
262144 | Enables White Redaction
524288 | Enables Span Documents
1048576 | Disables Annotation Capability
2097152 | Shows Hits on Page
4194304 | Reserved
8388608 | Disable Launch Capability


Zoom Example - OptPage (Viewer)

This example increases or decreases the document zoom factor as the user presses the "+" and "-" keys.

Private Sub optpage1_KeyPress(KeyAscii As Integer)

  If Chr(KeyAscii) = "+" Then

   Let optpage1.Zoom = optpage1.Zoom + 1

  Else

   If Chr(KeyAscii) = "-" Then

    Let optpage1.Zoom = optpage1.Zoom - 1

   End If

  End If

End Sub


Annotations Overview

A custom storage mechanism is provided for the storage and retrieval of annotations. Unlike other viewers, the OptPage ActiveX Control viewer does not automatically burn annotations into the page being viewed. In fact, the viewed page is never modified from its original format. Instead, annotations are stored in a separate directory according to a specific scheme. Assume the page being viewed is:

c:\docs\viewpage.doc

If annotations exist on any page of the document, the annotation file is stored as:

c:\docs\viewpage.doc\notes.ann

Annotations provide the ability to add comments, highlights, etc. to a section of a document page in the Viewer control. Any user can add annotations at any time. Annotations can also be hidden to provide an unobstructed view of the document.

A user (or application) can add any number of annotations. Annotations are saved or discarded when the document is closed, annotations are "unlocked" via the LockAnnotations method, or the user manually closes the annotation toolbar.

The Viewer control provides three methods for annotating a document. The methods, described below, include:

· Using the built-in Annotation ToolBar

· Using an Application-defined ToolBar

· Though direct use of the Using the Annotation API.


Security and Annotations Overview

Security and Annotations

The IBPM System contains many security features that are associated with galleries, applications, users, and IBPM tools (see the IBPM System Documentation for details on the security features of the system and how to manage the security of the system using the Security Tool). When integrating the IBPM Viewer SDK with the IBPM System, there are several items to understand with regard to the IBPM Viewer:

1) Each user in the IBPM System has certain viewing privileges and an assigned security level (which are configured with the Security Admin Tool in the IBPM System or by using a security object defined in the IBPM SDK).

2) A user can only view annotations on an IBPM Document if the user is assigned a security level equal to or higher than the security level assigned to a given annotation. For instance, a user with a security level of 7 could see all annotations of security level 7 or less, however, the user would not see annotations of a higher security level.

Note 1: An annotation's security level is dependent upon the user that created the annotation. For instance, a user with a security level of 5 could create annotations that could be viewed by other user's with a security level of 5 or greater. However, user's with a security level below 5 would not be able to view the annotation.

Note 2: Black and White Redaction’s always show up no matter what the security level is since they may hide sensitive data. However, a user can only alter them if the user has an equal or higher security level.

3) A user can only add, modify, and/or delete annotations to an IBPM Document if the user has been assigned the appropriate privileges and security level to do so. For instance, a user must be given Add/Modify rights in the IBPM System to be able to add, modify, and/or delete annotations. Furthermore, the user's security level also determines if the user can alter an annotations. See the section above for information on a user's security level.

4) Before a user can add, modify, and/or delete annotations, the user must lock the IBPM Document Page. This is only possible if the page is not locked another user. When developing for this scenario, the developer has to take into account that if the page is locked then a MessageBox is returned informing the user that the page is currently locked and the user who has the page locked (Optional). Another scenario is if the attempt to lock the page fails then it would be appropriate to return a MessageBox informing the user that the lock failed and the error code of the failure (Optional).

5) When unlocking an IBPM Page, there should be a check to see if the page changed and, if so, then either the changes to the page (page changes could be adding, modifying, and/or deleting annotations and/or page rotation) could be saved automatically or the user could be prompted to save changes. This requires the developer to take into account several scenarios. The first scenario is that annotations could be saved automatically and only a MessageBox would pop up if the unlocking and saving failed. The second scenario could be to use the predefined Viewer SDK PromptSave method which would pop up a dialog to allow the user the option to save annotations. The third scenario is to create a customized save dialog that would have the logic to do the saving and unlocking (possibly of multiple documents) which would require utilizing the Viewer SDK LockAnnotations method under various conditions. The third scenario is more advanced, however, it would offer the developer the greatest flexibility when creating a customized application.

6) Using the Viewer SDK there are two methods to allow the creation of annotations. The first method is to use the predefined IBPM Annotation Toolbar. This could be implemented by using a menu item or any other event-driven control to set the KeepAnnotToolbarVisible property to TRUE and to then set the ActivateAnnotations property to TRUE (see these two properties for examples). The second method would be to create a customized annotation toolbar and then use the ExecuteAnnotToolboxCmd method to execute the creation of the appropriate annotation on an IBPM Page. This second method is more advanced, however, it gives the developer more control for a customized application.

Note: Using either of these mechanisms requires the developer to implement logic that determines if the page has been successfully locked before enabling the annotation toolbar.


Appendix B - IBPM Toolkit Related Functionality (Viewer)

DisplayPage

DoNextPage

DoPrevPage

DoSaveAnnots

DoSelectPage

ExecuteAnnotToolboxCmd

IsNextPage

IsPrevPage

LoadOptikaPage

LockAnnotations

NextPage

PageChanged

PageCount

PageNumber

PrevPage

PromptSave

SaveAnnots

ShowAnnotations


Annotation Security Level Overview

Annotations have a security level associated with them equal to the security level of the author. An annotation can only be viewed if the user has a security level equal to or greater than the author’s. The author or Administrator can change the security level of the annotation to allow users with lower security level access to view them. The author may do this via the user interface. The application programmer can do it via various properties and methods listed below.

An exception to this is the White and Black redaction. These can be seen by all users but can be edited either by the person that created them or by an annotation administrator.

For example, if the author has as security level of five and creates an annotation, only those users with a security level of five or greater will be able to see it. But level three users also need to see this annotation. Therefore the authors changes the annotation security level to three so that level three and higher users will be able to see it but can not edit it. The author (user) may change the security level of an annotation by holding down the right mouse button and double-clicking on the left mouse button. This will display the annotation information window with a Note View Level slide bar that allows the user to select any security level up to and equal to his or her own security level.

Properties and methods that relate to security levels that may be used programmatically include:

AutoLoadPage - OptPage (Viewer)

AutoPrintPage - OptPage (Viewer)