Topics: CAB & Smart Client Software Factory
Dec 9, 2005 at 1:28 AM
originally posted by: Zjokke


Currently the MDIWorkSpace uses the WindowSmartPartInfo to set the properties of the new MDI Child window.
Because the WindowSmartPartInfo missed the FormBorderStyle and size of the Form was set via its Height and Width properties (and not via the ClientSize property), I created a two classes "CustomMDIWorkSpace" (inheriting from MDIWorkSpace) and "CustomMDISmartPartInfo".
All went well till I added the CustomMDISmartPartInfo as a control in the Toolbox.
When the control is set on a SmartPart, it creates the code to implement the ISmartPartInfoProvider.

When I run the application, I always get a ISmartPartInfo instance of type WindowSmartPartInfo in the GetSmartPartInfo of the implemented interface.
The reason for that is the implementation of WindowWorkSpace where MDIWorkSpace inherits from.
The implementation forces the SmartPartInfo to be a WindowSmartPartInfo.

Therefor, it would be interesting to add some common used form properties to the WindowSmartPartInfo like ...
- FormBorderStyle
- WindowState (could be handy too)

... and to set the new form size in the WindowWorkSpace.SetWindowProperties by using the ClientSize property.

I think it will improve the use of WindowWorkSpace and MDIWorkSpace a lot.

Kind regards,
Jo Goos