Properties

AsyncDownload [in, out] BOOL: This is an option to improve the screen update. If the download is not asynchronous, then the screen around the OCX will not be updated until the download is finished. On the other hand, you must be careful with the async download, as you might not be able to set properties like "Page" until the download is finished (see event LoadFinished). After setting this option, read the value again to check whether this feature is supported. This has no effect on local files. Default: FALSE

Enabled [in, out] BOOL: Defines whether the control is enabled or disabled. This will have an effect on the user interface. Default: TRUE

BackColor [in, out] OLE_COLOR: Defines the background color, i.e. the color that is painted on:

•  the whole background if no preview file can be displayed, and

•  the background outside the paper. Default: RGB(192, 192, 192) [light gray]

 

FileURL [in, out] BSTR: The most important property. Defines the name of the preview file. This can be a file name as well as a URL. Default: <empty>

Pages [out] Long: The total number of pages in the preview

CurrentPage [in, out] Long: Sets or reads the current page index (1..pages). Default: 1

ToolbarEnabled [in, out] BOOL: Defines whether the toolbar should be displayed. The toolbar is not necessary, as all of its functions can be called by methods (as an example, see LLVIEW30.EXE and its menu items). So there is no problem at all in defining your own toolbar. Default: TRUE

ToolbarButtons [out] LPDISPATCH: Returns a ToolbarButtons object that can be used to get or set the status of each toolbar button. The object has the following methods:

      GetButtonState([in] nButtonID) LONG Returns the button state for the passed TLB: constant.

Value

Meaning

Constant

-1

Hidden

TLBS_PRV_HIDE

0

Default

TLBS_PRV_DEFAULT

1

Enabled

TLBS_PRV_ENABLED

2

Disabled

TLBS_PRV_DISABLED

 

Example:

Dim oTlb as ToolbarButtons

Set oTlb = LlViewCtrl1.ToolbarButtons

MsgBox oTlb.GetButtonState(TLB_PRV_FILEEXIT)

      SetButtonState([in] nButtonID, [in] nButtonState) Sets the button state for the passed TLB_ constant. See above for valid state values.

Example:

Dim oTlb as ToolbarButtons

Set oTlb = LlViewCtrl1.ToolbarButtons

oTlb.SetButtonState TLB_PRV_FILEEXIT, TLBS_PRV_HIDE

The ID constants can also be found in the file MenuID.txt of your List & Label installation.

ShowThumbnails[in, out] BOOL: Defines whether the thumbnail bar is visible in the preview control. Default: TRUE

SaveAsFilePath [in, out] BSTR: Defines the default path for the "Save as..." dialog. When using the SaveAs method the user-defined file name will be returned.

CanClose[out] BOOL: Must be used to query the state of the control before closing the hosting form/page. If the result is FALSE, the control must not be destroyed.

Version [out] LONG: Returns the version number of the OCX control (MAKELONG(lo,hi)).