Hi guys.. i need your solutions about my problem. Here, when i make a threading code then i close the main form, it displayed :
"An unhandled exception of type system.nullreferenceexception occured in system.windows.forms.dll
additional information object referenced not set to an instance of an object."
i cant find any solution about it by my self... :(
Anyway thanks for your great solutions...

ERROR ON CLOSING MY PROGRAM WHEN THREADING IS USING
Martin Henke
Your next step should be to look at the stack trace to see where this error occured, so you can look at the code and work out why.
Help me please
OK, I can't be sure where the problem was without seeing the code. But, it sounds like it's fixed, so that's good.
Otto Fischer
Roquefort
paulinmadison
Thanks, but the error is appeared without any stack trace or error number. That's why i feel a little bit dizzy...
the condition like this :
1. I made a form, let's say it's name is FormThread, in this form (event load) i wrote a code like this :
Thread lclThread = new Thread (new ThreadStart(myprocedure));
lclThread.Start();
2. in myprocedure method, i wrote a code that communicate to any device lets say that device is a digital camera. This procedure task is doing any survilence action.
3.Whether it's opened or closed, then i close the Application form, that's exception handling is displayed without any information about stack trace or error number.
Krish Srinivasan