We're working on a very large .NET WinForms composite application - not CAB, but a similar home grown framework. We're running in a Citrix and RDP environment running on Windows Server 2003.
We're starting to run into random and difficult to reproduct "Error creating window handle" error that seems to be an old fashion handle leak in our application. We're making heavy use of 3rd Party controls (Janus GridEX, Infralution VirtualTree, and .NET Magic docking) and we do a lot of dynamic loading and rendering of content based on metadata in our database.
There's a lot of info on Google about this error, but not a lot of solid guidance about how to avoid issues in this area.
Does the stackoverflow community have any good guidance for me for building handle-friendly winforms apps?
I have tracked down a lot of issues with UIs not unloading as expected in WinForms.
Here are some general hints: