Spread 8.0 Documentation
OwnerPrintPageCount, ScriptOwnerPrintPageCount Methods
Support Options
ActiveX Reference > ActiveX Methods > OwnerPrintPageCount, ScriptOwnerPrintPageCount Methods

Glossary Item Box

OwnerPrintPageCount, ScriptOwnerPrintPageCount Methods


See Also    DLL   Example

Applies To

fpSpread control

Description

Determines the number of pages when using the Owner Print feature.

Syntax

C++

BOOL CSpreadSheet::OwnerPrintPageCount(long hDC, long Left, long Top, long Right, long Bottom, short* PageCount);

Visual Basic

fpSpread.OwnerPrintPageCount(ByVal hDC As OLE_HANDLE, ByVal Left As Long, ByVal Top As Long, ByVal Right As Long, ByVal Bottom As Long, PageCount As Integer) As Boolean

Note: The ScriptGetOwnerPrintPageCount method uses the same syntax except method parameters that are not passed "ByVal" are declared as variants. For more information on Script methods, see Scripting Environment Usage.

Parameters

The following parameters are available:

Parameter Description
hDC Device context handle
Left Left coordinate of owner-defined rectangle, in twips
Top Top coordinate of owner-defined rectangle, in twips
Right Right coordinate of owner-defined rectangle, in twips
Bottom Bottom coordinate of owner-defined rectangle, in twips
PageCount Returns the number of pages
Pages are one-based.

Remarks

This method is called for the current sheet setting unless you first set the Sheet property to specify the sheet with which you want to work.

Use the OwnerPrintDraw method to print individual sheet pages to a owner-defined area on the printed page. The OwnerPrintDraw method prints one page at a time.

Note: Call this method if you use the Spread control in a scripting environment (for example, Microsoft's Visual InterDev or Internet Explorer) or a non-scripting environment. However, if you want to use the Spread control in a scripting environment and you want to change any parameter that is not passed "ByVal", you must set the ScriptEnhanced property to True and call the ScriptGetOwnerPrintPageCount method. ScriptGetOwnerPrintPageCount method parameters that are not passed "ByVal" are declared as variants.

Return Type

True if successful; otherwise, False.

See Also

Printing to an Owner-Defined Area on a Page

ScriptEnhanced, Sheet properties

OwnerPrintDraw method

DLL Correspondence

SSOwnerPrintPageCount

Copyright © GrapeCity, inc. All rights reserved.