JaedenRuiner 0 Newbie Poster

First off, I use SharpDevelop for my vb.net work, and it has a weird glitch that it claims it's trying to load a non-existent file. This error is actually indicative of trying to access (dereference) a nothing object.

However, I don't quite understand why it is having this error. I have a form some components, and some class lists i created. Nothing too complicated.

Okay, now in my menu, i have a menu item, Exit, and in the MainMenu event properties, I have the OnDropDownItemClicked() event set. Based upon the Tag of each menu item I know which item was clicked. I even have my sub-menu's OnDropDownItemClicked() event pointed to the same method, because well, they all take the same parameters, and each menuitem tag is unique.

in a select case() statement, i evaluate the Tag and for the ExitMenuItem I execute "Close"

I then get this weird error:

Exception System.ObjectDisposedException was thrown in debuggee:
Cannot access a disposed object.

CreateHandle()
CreateHandle()
get_Handle()
ReparentToDropDownOwnerWindow()
SetVisibleCore()
OnItemClicked()
HandleItemClick()
HandleClick()
HandleMouseUp()
FireEventInteractive()
FireEvent()
OnMouseUp()
OnMouseUp()
WmMouseUp()
WndProc()
WndProc()
WndProc()
WndProc()
OnMessage()
WndProc()
DebuggableCallback()
System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop()
RunMessageLoopInner()
RunMessageLoop()
Run()
OnRun()
DoApplicationModel()
Run()
Main() - 17d14f5c-a337-4978-8281-53493378c1071.vb:81,13

However, when I click the X to close the app, i do not get this error. How can that be? They should both be "closing the form" why does one cause this exception and the other doesn't?

Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner