I have a project with a sub main & two forms (form1 & form2).
the sub main does application.run (x) where x is an instance of form2.
In the load event of form2 there is logic to show form1 as a dialog and if it returns cancel then it does me.close to terminate the application.
This works fine unless form2 contains an activex control.
In this case I get an error 5 from the application.run with the description "Cannot access a disposed object named Form2".
Has anyone else come across this bug? At present I am using error handling to ignore the error which occurs. Has anyone a better work-around?
Thanks for your help.
Glyn.
the sub main does application.run (x) where x is an instance of form2.
In the load event of form2 there is logic to show form1 as a dialog and if it returns cancel then it does me.close to terminate the application.
This works fine unless form2 contains an activex control.
In this case I get an error 5 from the application.run with the description "Cannot access a disposed object named Form2".
Has anyone else come across this bug? At present I am using error handling to ignore the error which occurs. Has anyone a better work-around?
Thanks for your help.
Glyn.