views:

36

answers:

1

I have a Windows Form desktop CRUD application. The users are finding that if it sits too long minimized all the Controls turn to Black Filled Boxes and it becomes unresponsive.

This is my first large app and I am having trouble even figuring out WHERE to start on this. Searching the Web for 'Black Filled Boxes' hasn't been real productive...

What am I doing wrong? Where can I start looking? My app is a single Form that embeds the neccessary UserControl in the Main Area based on what they select in the Navigation menu on the Form.

Example; They select Insurance and it displays ucInsurance in ShellForm's main content area.

Idea's? I'd appreciate anything. I tried turning Double Buffer on for the Shell Form and all User Controls but that hasn't seemed affective.

+2  A: 

Start by looking how your form is behaving with Taskmgr.exe. Click Processes tab, View + Select columns and tick Handles, USER objects, GDI objects. If any of these columns for your process keeps climbing up and up you've got a resource leak, usually by forgetting Dispose(). GDI being the likely one from your description. The show is over when it reaches 10,000.

Hans Passant
I did this and after opening my app and just bouncing around for 5 minutes, Search and load a couple of people, my stats were thus --> MemUsage=81000K, Handles=567, Threads=16, USERObjects=412, GDIObjects=301.Is this cause for concern that high that soon? I will leave it open and report back on my findings later as well.
Refracted Paladin
Also, is it "Normal" for my app's memusage to drop to 4000K on Minimize and then on Maximize to return only to about 12000K when it was 80000+K before?
Refracted Paladin
Yes, that's normal. Windows aggressively trims the working set of a process when its main window is minimized. Don't pay attention to memory. Do try to repro the customer's problem, an idle form that doesn't trigger a garbage collection would be associated with leakage due to forgetting to call Dispose().
Hans Passant
Thanks, did not know that. I will leave it alone now for awhile. Luckily this is only an in house app and it is still in BETA!
Refracted Paladin