Hide

SftPrintPreview/OCX 1.0 - ActiveX Print Preview Control

Display
Print

SftPrintPreview.HelpWanted Event

The Help button is clicked.

Syntax

VB.NETPrivate Sub object_HelpWanted(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.HelpWanted
VBPrivate Sub object_HelpWanted(ByVal HelpName As String)
C#.NETvoid object_HelpWanted(object sender, EventArgumentType e);
VC++void OnHelpWantedobject(_bstr_t HelpName);
CHRESULT OnHelpWantedobject(BSTR HelpName);

object

A SftPrintPreview object.

HelpName

Specifies which portion of the control requested help.

ValueDescription
ToolbarThe Help button of the tool bar was clicked.
PageSetupThe Help button of the Page Setup dialog was clicked.

Comments

The HelpWanted event occurs when the Help button is clicked.

The user can request online help by clicking on the Help button of the Page Setup dialog or by clicking on the Help button of the built-in tool bar.

This event does not occur when the user hits F1 (or similar keys) as these are normally handled by the application.

The WantHelpButton property is used to define whether the Help button is visible on the tool bar.

Examples

VB.NET

    ' In case the richedit control changed, we have to reformat everything
    AxSftPrintPreview1.Restart(SftPrintPreviewRestartConstants.restartSftPrintPreviewComplete)
End Sub

Private Sub AxSftPrintPreview1_PageSetupWanted(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftPrintPreview1.PageSetupWanted
    AxSftPrintPreview1.PageSetup(0)
End Sub

Private Sub AxSftPrintPreview1_HelpWanted(ByVal sender As Object, ByVal e As AxSftPrintPreviewLib10._ISftPrintPreviewEvents_HelpWantedEvent) Handles AxSftPrintPreview1.HelpWanted
    MessageBox.Show("Sorry, this sample doesn't offer a help file")
End Sub

Private Sub AxSftPrintPreview1_CloseWanted(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftPrintPreview1.CloseWanted
    MenuViewRichEdit_Click(Me, New System.EventArgs())
End Sub

VB6

    ' Connect the RichEdit control to the print preview control
    SftPrintPreview1.ContentProviderCallbackX RichTextBox1.hWnd, SftPrintPreview1.RenderRichEditX, 0
End Sub

Private Sub SftPrintPreview1_PageSetupWanted()
    SftPrintPreview1.PageSetup 0
End Sub

Private Sub SftPrintPreview1_HelpWanted(ByVal HelpName As String)
    MsgBox ("Sorry, this sample doesn't offer a help file")
End Sub

Private Sub SftPrintPreview1_CloseWanted()
    ViewRichEdit_Click
End Sub

C#

    axSftPrintPreview1.Restart(SftPrintPreviewRestartConstants.restartSftPrintPreviewComplete);
}

private void axSftPrintPreview1_PageSetupWanted(object sender, System.EventArgs e)
{
    axSftPrintPreview1.PageSetup(0);
}

private void axSftPrintPreview1_HelpWanted(object sender, AxSftPrintPreviewLib10._ISftPrintPreviewEvents_HelpWantedEvent e)
{
    MessageBox.Show("Sorry, this sample doesn't offer a help file");
}

private void axSftPrintPreview1_CloseWanted(object sender, System.EventArgs e)
{
    menuViewRichEdit_Click(this, new System.EventArgs());

C++

    m_vPrintPreview1->PageSetup((long) m_hWnd);
}

void CSftPrintPreviewDlg::OnCloseWantedSftPrintPreview1()
{
    OnOK();
}

void CSftPrintPreviewDlg::OnHelpWantedSftPrintPreview1(LPCTSTR HelpName)
{
    MessageBox(_T("Sorry, this sample doesn't offer a help file"));
}

BEGIN_EVENTSINK_MAP(CSftPrintPreviewDlg, CDialog)
    //{{AFX_EVENTSINK_MAP(CSftPrintPreviewDlg)
	ON_EVENT(CSftPrintPreviewDlg, IDC_SFTPRINTPREVIEW1, 8 /* CloseWanted */, OnCloseWantedSftPrintPreview1, VTS_NONE)

See Also SftPrintPreview Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.