By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,835 Members | 1,959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,835 IT Pros & Developers. It's quick & easy.

Cannot access a disposed object

P: n/a
i close a form and i want to open it again it show me

Cannot access a disposed object

at vb6 this is ok
at comman1_click
form1.show

at comman2_click
form1.close

i click one then other again again and again
at vb6 its ok but at vb.net
i take this msg
Cannot access a disposed object

how i can close the forms and open it again and again
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Without seeing any more of that code... your probably creating a NEW
instance of the object somewhere else.... and just not showing it until
you get to that point in time.....

close.... means you want to dispense with the object.... if you mean to
HIDE the object... then do that...

HTH

"salih ataoz" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...
i close a form and i want to open it again it show me

Cannot access a disposed object

at vb6 this is ok
at comman1_click
form1.show

at comman2_click
form1.close

i click one then other again again and again
at vb6 its ok but at vb.net
i take this msg
Cannot access a disposed object

how i can close the forms and open it again and again

Jul 21 '05 #2

P: n/a

"salih ataoz" <an*******@discussions.microsoft.com> schreef in bericht
news:00****************************@phx.gbl...
i close a form and i want to open it again it show me

Cannot access a disposed object

at vb6 this is ok
at comman1_click
form1.show

at comman2_click
form1.close

i click one then other again again and again
at vb6 its ok but at vb.net
i take this msg
Cannot access a disposed object

how i can close the forms and open it again and again


Do you want the same form each time? Then you should look at hide instead
of close. If you use close you'll need to create a new instance of the form
each time.

Yves

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.