The PrintPreviewDialog class is actually a wrapper for the PrintPreviewControl class, and this is what gives the toolbar buttons. Any form can contain PrintPreviewControl, so you will need to make the PrintPreviewControl command in the dialog form you created:
public partial class PreviewDialog : Form
{
public PreviewDialog() {
this.printPreviewControl1 = new System.Windows.Forms.PrintPreviewControl();
this.SuspendLayout();
this.printPreviewControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.printPreviewControl1.Location = new System.Drawing.Point(0, 0);
this.printPreviewControl1.Name = "printPreviewControl1";
this.printPreviewControl1.Size = new System.Drawing.Size(292, 273);
this.printPreviewControl1.TabIndex = 0;
this.printPreviewControl1.Columns = 1;
this.printPreviewControl1.Zoom = 1.0;
}
}
The Columns property, which is currently set to 1, is the number of pages displayed by the control horizontally across the screen. The Zoom property sets the page scale; 1.0 - full page; therefore, <1.0 will be a thumbnail, a> 1.0 will be an expanded image in the control on the page. What you would like to do with the PreviewDialog class above is to add System.Windows.Forms.ToolStrip to it, and then add buttons to handle scaling and page by the specified properties (columns and scale).
, ( PreviewDialog), :
private void buttonPrintPreview_Click(object sender, EventArgs e) {
PreviewDialog dlg = new PreviewDialog();
dlg.ShowDialog();
return;
}
,