| | | StrataFrame User
       
Group: Forum Members Last Login: 05/25/2007 3:34:57 PM Posts: 235, Visits: 309 |
| I've got an existing form that I need to add MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl support, that is:
public partial class SearchForm : Form, IFormHelper, MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl
What methods do I need to add to make the "does not implement interface member" errors go away. |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 09/26/2008 8:30:36 AM Posts: 2,685, Visits: 1,886 |
| | If you hover over the interface name on the inherits declaration, you should be the little "block" at the bottom, right-hand corner of the interface name. When you put your mouse over the block, you'll get a menu that you can open up. That menu should have an option that says "Implement Interface Explicitly," which will create the necessary member stubs for you. The best way to make sure you implement it properly is to open up the BaseForm.vb file and use the implementation from that file.
www.bungie.net |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 09/26/2008 8:30:36 AM Posts: 2,685, Visits: 1,886 |
| | The code for adding the IContainerControl interface to your existing form is this: #region IContainerControl Membersprivate MicroFour.StrataFrame.Business.BusinessObjectCollection _BusinessObjects = new MicroFour.StrataFrame.Business.BusinessObjectCollection(); private List<MicroFour.StrataFrame.UI.IInitOnFormLoad> _ObjectsToInitOnLoad = new List<MicroFour.StrataFrame.UI.IInitOnFormLoad>(); private List<MicroFour.StrataFrame.UI.IPreInitOnFormLoad> _ObjectsToPreInitOnLoad = new List<MicroFour.StrataFrame.UI.IPreInitOnFormLoad>();void MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl.AddBusinessObject(MicroFour.StrataFrame.Business.BusinessLayerBase BusinessObject) { this._BusinessObjects.Add(BusinessObject); }void MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl.AddObjectToInitOnLoad(MicroFour.StrataFrame.UI.IInitOnFormLoad ObjectToInit) { this._ObjectsToInitOnLoad.Add(ObjectToInit); }void MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl.AddObjectToPreInitOnLoad(MicroFour.StrataFrame.UI.IPreInitOnFormLoad ObjectToPreInit) { this._ObjectsToPreInitOnLoad.Add(ObjectToPreInit); }void MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl.RemoveBusinessObject(MicroFour.StrataFrame.Business.BusinessLayerBase BusinessObject) { this._BusinessObjects.Remove(BusinessObject); } #endregion
www.bungie.net |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 09/26/2008 8:30:36 AM Posts: 2,685, Visits: 1,886 |
| That code will not add the functionality for the business objects to initialize themselves when the form loads, but it will add them to the form's business objects collection.
www.bungie.net |
| |
|
|