hi,
i am using tabcontrol project and there is a button in one of the
tab page and when the user clicks the button a new window is opened
My problem is that when i close the window and change tab an error occurs
The error listing is shown below.
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object.
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMet
hods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, In
t32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, Applicatio
nContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at System.Windows.Forms.ThreadContext.OnThreadException(Exception t)
at System.Windows.Forms.Control.WndProcException(Exception e)
at System.Windows.Forms.ControlNativeWindow.OnThreadException(Exception e)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMet
hods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, In
t32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, Applicatio
nContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Form1.Main(String[] args)
please help me
thanks in advance
msfan