Monthly Archives: January 2007

Form Resize Issue in a CAB Application

When you build a CAB application using the SCSF (Smart Client Software Factory) Guidance package,
you get couple of workspaces to show your SmartParts or Views. Once of them is the ModalWindowWorkspace
which is inherited from a sub-classed WindowWorkSpace. This sub-classes WindowWorkSpace is created
by the Guidance Package and is in the Infrastructure.Library DLL in the UI folder.

I came across an issue when displaying a SmartPart in a Modal window. The first time the Modal window
is displayed the form (which is created auto-magically by CAB) is sized correctly. However, if you
invoke the same SmartPart again, the window is sized incorrectly and parts of your View are hidden.

To solve this issue ensure that you set the “Minimum Size” property of your view User Control to the desired form size.