combit List & Label 29 - .NET Help
combit.Reporting Namespace / LlCore Class / LlStgsysDrawPage Method

The handle returned by LlStgsysStorageOpen

DC in which to print (usually a printer or screen device). Can be null (see below).

Reference DC which can be used to get the unprintable area etc. For a screen DC, this is the (default) printer DC, for a printer DC it is the same as hDC above. Can be null (See below).

Value Meaning
true

the user will be asked

false

the default printer will be used.

Points to a RECT structure containing the device coordinates in which to print. If this is null, the printer.s values will be used. Must not be null when printing to a non-printer DC!

Page index

Value Meaning
true

Defines that the print should be fit into the area

false

the original size should be kept



In This Topic
    LlStgsysDrawPage Method
    In This Topic

    Paints a preview page to a screen or printer device. 

    You should avoid calling this API directly. The PreviewFile Class offers you a much more powerful way to work with preview files.

    Syntax
    'Declaration
     
    
    Public Shared Sub LlStgsysDrawPage( _
       ByVal hStg As IntPtr, _
       ByVal hDC As IntPtr, _
       ByVal hPrnDC As IntPtr, _
       ByVal askPrinter As Boolean, _
       ByVal rect As RECT, _
       ByVal pageIndex As Integer, _
       ByVal fit As Boolean _
    ) 
    public static void LlStgsysDrawPage( 
       IntPtr hStg,
       IntPtr hDC,
       IntPtr hPrnDC,
       bool askPrinter,
       RECT rect,
       int pageIndex,
       bool fit
    )
    public:
    static void LlStgsysDrawPage( 
       IntPtr hStg,
       IntPtr hDC,
       IntPtr hPrnDC,
       bool askPrinter,
       RECT rect,
       int pageIndex,
       bool fit
    ) 

    Parameters

    hStg

    The handle returned by LlStgsysStorageOpen

    hDC

    DC in which to print (usually a printer or screen device). Can be null (see below).

    hPrnDC

    Reference DC which can be used to get the unprintable area etc. For a screen DC, this is the (default) printer DC, for a printer DC it is the same as hDC above. Can be null (See below).

    askPrinter
    Value Meaning
    true

    the user will be asked

    false

    the default printer will be used.

    rect

    Points to a RECT structure containing the device coordinates in which to print. If this is null, the printer.s values will be used. Must not be null when printing to a non-printer DC!

    pageIndex

    Page index

    fit
    Value Meaning
    true

    Defines that the print should be fit into the area

    false

    the original size should be kept

    Remarks

    If hDC is null, it will be set to hPrnDC after the reference DC has been created.

    Requirements

    Platforms: Windows 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
    .NET: .NET Framework 4.8, .NET 6, .NET 7, .NET 8

    See Also