Print Error Win98

D

David Sabo

Hi all...

I having trouble printing on Win98. I cannot print more than once if I'm
lucky in win98, when the printdocument.print() is executed the following
Exception is raised. It doesn't start to execute the method raised by the
event PrintPage.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an
object.
at System.Windows.Forms.BackgroundThread.UpdateLabel()
at
System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPage(PrintDocume
nt document, PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument
document)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at Reportes.Ordenes.btnImprimir_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
*************************************************************

I already check and the printdocument object is not Null, also the
printer is valid (it was checked with isValid Function).
I'm trying to print on a local and remote printer, sometimes I get lucky
and the local one print the document.
This problem only appears in win98, the program in winxp doesn't have
troubles.

I appreciate an answer for this dilemma...

Thanks,
David Sabo
Caracas, Venezuela
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi David,

It is most likely a known bug in the .NET Framework. It has been fixed in
one of the .NET Service Packs (SP2 I suppose).
 
D

David Sabo

Thanks, I applied the SP2 and it didn't fix the problem, does anyone have a
clue?

David

Dmitriy Lapshin said:
Hi David,

It is most likely a known bug in the .NET Framework. It has been fixed in
one of the .NET Service Packs (SP2 I suppose).

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

David Sabo said:
Hi all...

I having trouble printing on Win98. I cannot print more than once if I'm
lucky in win98, when the printdocument.print() is executed the following
Exception is raised. It doesn't start to execute the method raised by the
event PrintPage.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance
of
an
object.
at System.Windows.Forms.BackgroundThread.UpdateLabel()
at
System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPage(PrintDocume
nt document, PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument
document)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at Reportes.Ordenes.btnImprimir_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
*************************************************************

I already check and the printdocument object is not Null, also the
printer is valid (it was checked with isValid Function).
I'm trying to print on a local and remote printer, sometimes I get lucky
and the local one print the document.
This problem only appears in win98, the program in winxp doesn't have
troubles.

I appreciate an answer for this dilemma...

Thanks,
David Sabo
Caracas, Venezuela
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top