G
Guest
Hi, I'm trully excited to use VB.NET's PrintDocument to make my printouts. On
them I draw strings, images and lines.
All perfect, if I invoke the Print or the PrintPreview one time per run.
At second time I onvoke print or preview, the DrawLine or DrawImage go well,
but the first DrawString the program tries to execute pops an exception:
************** Exception Text **************
System.ArgumentException: Invalid parameter used.
at System.Windows.Forms.PrintPreviewControl.CalculatePageInfo()
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
************** Loaded Assemblies **************
mscorlib
(and so on...)
I already checked the content of my DrawString instruction and all the
parameters at the second time have the same values, except the handle number
where objects were new.
Please note that the problem emerges at the second time I try to print or
printpreview, not at the second page of a multiple page printout.
Help please.
them I draw strings, images and lines.
All perfect, if I invoke the Print or the PrintPreview one time per run.
At second time I onvoke print or preview, the DrawLine or DrawImage go well,
but the first DrawString the program tries to execute pops an exception:
************** Exception Text **************
System.ArgumentException: Invalid parameter used.
at System.Windows.Forms.PrintPreviewControl.CalculatePageInfo()
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
************** Loaded Assemblies **************
mscorlib
(and so on...)
I already checked the content of my DrawString instruction and all the
parameters at the second time have the same values, except the handle number
where objects were new.
Please note that the problem emerges at the second time I try to print or
printpreview, not at the second page of a multiple page printout.
Help please.