private void print() { btnPrint.Visible = false; PrintForm pf = new PrintForm(); pf.Form = this; pf.PrinterSettings.DefaultPageSettings.Landscape = true; pf.PrinterSettings.DefaultPageSettings.Margins.Left = 30; pf.PrinterSettings.DefaultPageSettings.Margins.Right = 30; pf.PrinterSettings.DefaultPageSettings.Margins.Top = 30; pf.PrinterSettings.DefaultPageSettings.Margins.Bottom = 30; pf.PrintAction = System.Drawing.Printing.PrintAction.PrintToPreview; pf.Print(); btnPrint.Visible = true; }