Hello.
This is how I do the printing in my winforms application.
Lots of documents get printed every day cca 200 docs with 50 lines.
But sometimes it happens that printer is not available and application hangs... every month 2 times cca.
Should I be doing printDoc.Dispose() on the end?
Is it possible that the printer is unavailable because I dont dispose?
System.Drawing.Printing.PrintDocument printDoc = new System.Drawing.Printing.PrintDocument(); printDoc.BeginPrint += new System.Drawing.Printing.PrintEventHandler(OnBeginPrint); printDoc.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(OnPrintPage); rtbLines.AppendText("Something to print"); printDoc.Print();