VS 2008 C# Screen Lockups

Posted on 2011-04-19
Last Modified: 2012-05-11
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();


Open in new window

Question by:rwheeler23
    LVL 7

    Accepted Solution

    Check that you are correctly disposing this forms, use also a try-catch block, and keep memory usage in check. Maybe you will have to call the garbage collector.


    Author Comment

    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?
    LVL 7

    Assisted Solution


    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video discusses moving either the default database or any database to a new volume.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now