This code causes an exception:

dim box as new mult()
box.show <-------- cannot access a disposed object

I will preface this by saying I don't know .NET at all. However, the error message, I'm assuming, is basically saying that the box object has been destroyed. What code is there between those two lines?

Actually, I suspect that the opposite is the problem: the object was declared, but never initialized, and thus has a value of Nothing.

thank you all for responding.

let me try to explain what I am trying to accomplish.

........ dim box = new mult() .... create new object named box which is a copy of mult()

mult() is another windows form in the project

........ box.show .... display the mult() form

there is no code between the above two lines

somebody from another site, which shall remain nameless, suggested I set dispose() to false but failed to tell me how to do that.

maybe:
dim box as new mult

thankyou all again.. problem solved.. whew.....

There was nothing wrong with the orig code. I must have inadvertently changed a property. I re-entered my app and it is now working.. Must have been those darned aliens. ha ha

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.