|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MDI and OutOfMemoryExceptionI have this code that makes the form as an MDIChild: chartWindowController.GetForm().MdiParent = _expertTradeMainFrm; chartWindowController.GetForm().WindowState = FormWindowState.Normal; chartWindowController.GetForm().Show(); The above code snippet throws exception when Show() is called: Message "Object reference not set to an instance of an object." StackTrace " at System.Windows.Forms.ToolTip.CreateHandle()\r\n at System.Windows.Forms.ToolTip.get_Handle()\r\n at System.Windows.Forms.ToolTip.WmWindowPosChanging(Message& m)\r\n at System.Windows.Forms.ToolTip.WndProc(Message& msg)\r\n at System.Windows.Forms.ToolTip.ToolTipNativeWindow.WndProc(Message& m)\r \n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at Microsoft.Win32.SafeNativeMethods.MessageBox(HandleRef hWnd, String text, String caption, Int32 type)\r\n at System.Diagnostics.AssertWrapper.ShowMessageBoxAssert(String stackTrace, String message, String detailMessage)\r\n at System.Diagnostics.DefaultTraceListener.Fail(String message, String detailMessage)\r\n at System.Diagnostics.DefaultTraceListener.Fail(String message)\r\n at System.Diagnostics.TraceInternal.Fail(String message) \r\n at System.Diagnostics.Debug.Fail(String message)\r\n at CimsFramework.CimsSecurity.CmsUsrDataSheetSubModule.GetDataEntryInfo() in D:\\CIMS.NET\\CimsFramework\\CimsSecurity.cs:line 4127" But when the same is not a MDIChild then it works fine i.e., if I comment the line chartWindowController.GetForm().MdiParent = _expertTradeMainFrm, then the application works fine. I have Visual Team Edition 2005 for Developers + Windows XP Sp2. Can anyone let me know why this is happening or how to fix it. Thanks in advance. Regards Kiran |
|||||||||||||||||||||||