G
Guest
I am unable to figure out why this code does not work....it never prints
anything nor throws an exception.
PrintDialog dlg = new PrintDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
thread = new Thread(new ThreadStart(Print));
thread.Start();
}
public void Print()
{
Printer.PrintPages(pageParameters, dlg);
}
Printer.PrintPages is static method where I do some processing before print
document is generated
then from this method I call another static method
public static void PrintImages(byte[][] images, PrintDialog dlg)
{
// printDocument is assigned to some doc generated intenally
dlg.Document = printDocument;
dlg.Document.Print();
dlg.Dispose();
}
Thanks
anything nor throws an exception.
PrintDialog dlg = new PrintDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
thread = new Thread(new ThreadStart(Print));
thread.Start();
}
public void Print()
{
Printer.PrintPages(pageParameters, dlg);
}
Printer.PrintPages is static method where I do some processing before print
document is generated
then from this method I call another static method
public static void PrintImages(byte[][] images, PrintDialog dlg)
{
// printDocument is assigned to some doc generated intenally
dlg.Document = printDocument;
dlg.Document.Print();
dlg.Dispose();
}
Thanks