Link to home
Start Free TrialLog in
Avatar of rwheeler23
rwheeler23Flag for United States of America

asked on

VS 2008 C# Screen Lockups

I have a series class libraries that I have added to an external application that present various screens to the users. About 2 or 3 times a month all screens become unresponsive and the solution is to leave the application and come back in. It is virtually impossible to repeat what is causing this, I have tested all the screens individually and inside each program I have error capture routines that never return anything, the programs simply do not run. What kinds of traps can I use to determine why they fail to fire when called? I have attached a sample of my code to show how I invoke forms.
public void ViewAppliedDocuments(object sender, EventArgs e)
        {
            if (ViewAppliedDocumentsForm == null || ViewAppliedDocumentsForm.Created == false)
            {
                ViewAppliedDocumentsForm = new frmViewAppliedDocuments();
            }

            ViewAppliedDocumentsForm.Show();
            ViewAppliedDocumentsForm.Activate();
            ViewAppliedDocumentsForm.Focus();
        }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of JuanCarniglia
JuanCarniglia
Flag of Argentina image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rwheeler23

ASKER

Good point, there are about 12 pieces of code. I will check them all for the disposal of the form. All of my programs have an exit button plus they can click on the 'X' . I will  make sure the dispose method is in both places. I have never used the garbage collector. Can you provide any links that provide insight on how to use this?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial