|
-
May 13th, 2005, 02:02 PM
#1
Thread Starter
Addicted Member
Problem with Disposed objects [Resolved]
Hey everyone,
I created a program that searches Active Directory. I built the release version and it runs as it should. The problem comes up if I attempt to reopen the search form from the system tray again I get this error.
"Cannot access a disposed object named "Search"
I think the problem is coming up when the garbage collection runs it deletes the Search Form object out of memory. How can I prevent this from happening in my program?
"just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ObjectDisposedException: Cannot access a disposed object named "Search".
Object name: "Search".
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Form.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at Active_Directory_Advanced_Search.sysTray.ShowFormSelect(Object sender, EventArgs e)
at Active_Directory_Advanced_Search.sysTray.NotifyIcon_DoubleClick(Object sender, EventArgs e)
at System.Windows.Forms.NotifyIcon.OnDoubleClick(EventArgs e)
at System.Windows.Forms.NotifyIcon.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.NotifyIcon.WndProc(Message& msg)
at System.Windows.Forms.NotifyIconNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)"
Last edited by Porsche944; May 13th, 2005 at 03:17 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|