JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Creating Print Preview Dialogs

To display a print preview, all you have to do is to assign a print document to a print preview dialog's Document property (and have implemented at least the PrintPage event handler of the print document), and use the ShowDialog method to show the print preview. Here's how it looks in the Printing example on the CD-ROM:

Private Sub MenuItem3_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles MenuItem3.Click
    PrintPreviewDialog1.Document = PrintDocument1
    PrintPreviewDialog1.ShowDialog()
End Sub

You can see the print preview dialog in the Printing example in Figure 9.8.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor