![]() ![]() | ||
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.
![]() ![]() | ||