Click here to Skip to main content
15,888,003 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

1) Application Contains

MainForm:- which is Mainframe of Application.

BaseForm :- which contains controls e.g. ListBox

ChildForm1:- derived from BaseForm, which display Listbox

Worker_Thread:- which invokes and update ListBox items of Main_Thread Application.

2) Application Working:-

In MainFrame constructor, Thread is created and started running.

On MenuItem click of Mainform Application,
I create (BaseForm childform = new childForm1) Object and childForm1.show();

Using Workerthread, I invoked listbox control of mainform and added items into Listbox and it shown.
And When I close the form and reopen(recreate the object) to do the same procedure it doesnt show the added items into the control.(I have disposed the object properly).

At this time, Listbox.InvokeRequired becomes false. And I checked listBox through debugging, which was thrown disposedObjectException error internally.
Posted
Updated 4-Jan-10 22:40pm

1 solution

wrote:
I have disposed the object properly


wrote:
thrown disposedObjectException error


It sounds like you're calling Dispose on something you're still using?

Nick
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900