PrintDocument.GetPreviewPage Event

Definition

Occurs when the PrintManager requests a particular print page to be shown in the preview window.

public:
 virtual event GetPreviewPageEventHandler ^ GetPreviewPage;
// Register
event_token GetPreviewPage(GetPreviewPageEventHandler const& handler) const;

// Revoke with event_token
void GetPreviewPage(event_token const* cookie) const;

// Revoke with event_revoker
PrintDocument::GetPreviewPage_revoker GetPreviewPage(auto_revoke_t, GetPreviewPageEventHandler const& handler) const;
public event GetPreviewPageEventHandler GetPreviewPage;
function onGetPreviewPage(eventArgs) { /* Your code */ }
printDocument.addEventListener("getpreviewpage", onGetPreviewPage);
printDocument.removeEventListener("getpreviewpage", onGetPreviewPage);
- or -
printDocument.ongetpreviewpage = onGetPreviewPage;
Public Custom Event GetPreviewPage As GetPreviewPageEventHandler 

Event Type

Remarks

In the handler for this event, call SetPreviewPage to set the requested page as the current print preview page.

Applies to

See also