Printing a panel in c# -
Im printing a panel which is a registration form, and it has 3 small panels, but it is only a The blank page prints .. I tried many times but no solution was found.
PrintDialog myPrintDialog = new PrintDialog (); System Drawing Bitmap memorymaze = new system Drawing Bitmap (panel_stdadmcard.Width, panel_stdadmcard.Hyight); Panel_stdadmcard.DrawToBitmap (memory image, panel_streamcard.cnterrectengel); Print document print document 1 = new print document (); If (myPrintDialog.ShowDialog () == DialogResult.OK) {System.Drawing.Printing.PrinterSettings value; Value = myPrintDialog.PrinterSettings; MyPrintDialog.Document = printDocument1; PrintDocument1.PrintController = New Standards Contributor (); PrintDocument1.Print (); } PrintDocument1.Dispose (); You draw a panel on a bitmap, but you never use it, If this code is complete. You should apply the print page-event of the print document. And there you should use the drawer to draw a picture.
Comments
Post a Comment