|
-
Dec 23rd, 2003, 04:26 AM
#1
Thread Starter
Frenzied Member
show method not working [RESOLVED]
I can show form2 from form1 with this:
and I can get it to close using the close method.
the problem, however, is that when I go for a second showing of it, I get this message:
Cannot access a disposed object named "Form2".
I dim an instance of it in the declaration section of form1(that's where I'm showing and closing it)
what causes this and what do I do to be able to show it multiple times?
Last edited by Andy; Dec 29th, 2003 at 03:14 AM.
-
Dec 23rd, 2003, 04:38 AM
#2
Fanatic Member
instead of closing it set it's visible property to false, and then true.
Otherwise you will have to 'dim' up a new instance of your form as form1.close will destroy the instance of it created
-
Dec 23rd, 2003, 04:50 AM
#3
Lively Member
hi,
form2.hide() also does the job.
tom
-
Dec 23rd, 2003, 05:52 AM
#4
Thread Starter
Frenzied Member
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
|