System.NullReferenceException : System.Windows.Forms

  • Thread starter Thread starter RF
  • Start date Start date
R

RF

Hi,

I've been trying to trace this exception but I can't seem to find the source
of the problem:

Message: "Object reference not set to an instance of an object."

StackTrace: at
System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n at
System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason,
Int32 pvLoopData)\r\n at
System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason,
ApplicationContext context)\r\n at
System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)\r\n at System.Windows.Forms.Application.Run(Form
mainForm)\r\n


Thanks,

RF
 
Please post the code where this is happening and point out the exact line.
You should be able to find the exact line by stepping through the code. You
may need to add some Debug.WriteLine() statements to help you find the
method/event/property where this is happening.

Pete
 
Back
Top