troubleshooting Question

Form access error when try to use a Form from Project1 in Project2

Avatar of Thor Vestaberg
Thor Vestaberg asked on
.NET Programming
3 Comments1 Solution68 ViewsLast Modified:
I have two project in same solution, where I try to use a form from the other project in this project.

I have added Project1 as en reference in Project2 (Reference to the exe file - Correct? )

And then I try this in a mdicontainer form i Project2:

        Dim ReportFrm As New Project1.Form_report

        ReportFrm.Close()
        ReportFrm.MdiParent = Me
        ReportFrm.WindowState = FormWindowState.Maximized
        ReportFrm.Show()

Then I get this error when try "ReportFrm.Show()" : exception: can't access removed object

What to do ?
ASKER CERTIFIED SOLUTION
Miguel Oz
Senior Software Engineer
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros