System.NullReferenceException ???

  • Thread starter Thread starter Michael Murschell
  • Start date Start date
M

Michael Murschell

When I close my application, it always gives me this error at line...

MyBase.Dispose(disposing)

The error...

An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll

Additional information: Object reference not set to an instance of an
object.


Here is what I am doing in the form...
I have a Datagrid on a form. I have a DataSet that I am constantly updating
the rows with data I am pulling from some webservices.

Thank you for your help.
 
Oh, I have a Timer (System.Timers.Timer) that runs every 10 seconds that
calls the sub that updates the DataSet.
 
Make sure you stop the timer before you Close or Dispose the form.
I'd do this in the Form_Closing Event - just Timer.Stop or Timer.Enabled =
False.
If that doesn't help, trace the error back through the call stack using the
debugging features of the IDE.
________________________________
The Grim Reaper
 

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

Back
Top