SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Start printing.
VB.NET | object.PrintContents(ByVal ShowDialog As Boolean, ByVal Handle As Integer, ByVal AllowCurrentPage As Boolean) |
VB | object.PrintContents(ByVal ShowDialog As Boolean, ByVal Handle As Long, ByVal AllowCurrentPage As Boolean) |
C#.NET | void object.PrintContents(bool ShowDialog, int Handle, bool AllowCurrentPage); |
VC++ | HRESULT object->PrintContents(VARIANT_BOOL ShowDialog, long Handle, VARIANT_BOOL AllowCurrentPage); |
C | HRESULT object->raw_PrintContents(VARIANT_BOOL ShowDialog, long Handle, VARIANT_BOOL AllowCurrentPage); |
object
ShowDialog
True to display the Print dialog before printing, False otherwise.
Handle
The window handle of the application's main window, which serves as the parent window for the Print dialog. If 0 is specified, the application's main window is determined automatically.
AllowCurrentPage
True to enable the "Current Page" radio button on the Print dialog, False otherwise. The Print dialog on Windows versions before Windows 2000 does not offer a current page radio button.
The PrintContents method starts printing.
If the user modifies printer settings before printing, the PrinterChanged even occurs.
The PrintPages property can be used to define the pages to print using the PrintContents method.
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 Private Sub MenuPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuPrint.Click AxSftPrintPreview1.PrintContents(True, 0, False) End Sub Private Sub MenuPrintSetup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuPrintSetup.Click AxSftPrintPreview1.PrinterSetup(0) End Sub
SftPrintPreview1.Visible = False ' Show the RichEdit control RichTextBox1.Enabled = True RichTextBox1.Visible = True RichTextBox1.SetFocus End Sub Private Sub PrintDirect_Click() SftPrintPreview1.PrintContents True, 0, False End Sub Private Sub PrintSetup_Click() SftPrintPreview1.PrinterSetup 0 End Sub
private void axSftPrintPreview1_CloseWanted(object sender, System.EventArgs e) { menuViewRichEdit_Click(this, new System.EventArgs()); } private void menuPrint_Click(object sender, System.EventArgs e) { axSftPrintPreview1.PrintContents(true, 0, false); } private void menuprintSetup_Click(object sender, System.EventArgs e) { axSftPrintPreview1.PrinterSetup(0); }
See Also SftPrintPreview Object | Object Hierarchy