Game Development Reference
In-Depth Information
private void PrintPreviewButton_Click(object sender, EventArgs e)
{
using (StringReader inputText = new StringReader(PrintTextField.Text))
{
SimplePrintDocument printDocument = new SimplePrintDocument(inputText,
printFont);
if (cachedSettings != null)
printDocument.DefaultPageSettings = cachedSettings;
PrintPreviewDialog printPreviewDialog = new PrintPreviewDialog();
printPreviewDialog.Document = printDocument;
printPreviewDialog.ShowDialog();
}
}
Figure 21.3 shows the print preview dialog in action.
Figure 21.3 Print preview dialog in action.
Search Nedrilad ::




Custom Search