// Class that handles printing
class MyPrintDocument : PrintDocument
{
//...
}
when you want to print:
// Create an instance of your printer class
MyPrintDocument printer = new MyPrintDocument();
// Set StandardPrintController so status dialog won't appear
printer.PrintController = new StandardPrintController();