Maximizing a print preview dialog in c#

Here is a way to get a print preview dialog (or perhaps any resizeable dialog) to be maximized when opened.

The dialog may be cast to a Form allowing WindowState to be set.
For example:

PrintPreviewDialog dlg = new PrintPreviewDialog();
dlg.Document = doc;
((Form)dlg).WindowState = FormWindowState.Maximized;
dlg.ShowDialog();
Bookmark the permalink.

One Response to Maximizing a print preview dialog in c#

  1. Tohidul Islam says:

    Excellent Article help me a lot for a C# winform project

Leave a Reply

Your email address will not be published. Required fields are marked *