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

Re: System.NullReferenceException : System.Windows.Forms by pdavis68

pdavis68
Thu Jun 03 09:52:32 CDT 2004

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

"RF" <randy.foz@SPAMdialexia.com> wrote in message
news:uZMgwWXSEHA.1764@TK2MSFTNGP10.phx.gbl...
> 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
>
>