StrataFrame Forum

Inheretinance - MaintenanceFormToolStrip

http://forum.strataframe.net/Topic789.aspx

By Kari Paukku - 4/7/2006

Hi,

would it be possible to inherit a SF Maintenance Form so that the MaintenanceFormToolStrip would be editable using VS in the new inherited form?

The items in the form can be modified using code, but it would be nice to be able to modify the MaintenanceFormToolStrip using VS.

What I tried was 

1) create a SF Maintenance Form
2) make the "Modifier"-property "Public"
3) make a new form by inheriting from the form created in step 1

The MaintenanceFormToolStrip doesn't allow it self to be accessed. With a standard button the buttons properties are accessible.

What goes wrong here or is there a better way to achieve this?

TIA,

Kari

By Gary C Wynne - 4/8/2006

Hi Kari

>would it be possible to inherit a SF Maintenance Form so that the MaintenanceFormToolStrip would be editable using VS in the new inherited form?

An SF Maintenance form is really just an SF Standard Form with the extra bits (like the MaintenanceFormToolStrip) added in the template processing. The MaintenanceFormToolStrip is just another class and as such, you can easily subclass it, as indeed I have done. So, just create a class that inherits from MaintenanceFormToolStrip and make whatever changes you want to it. Whilst you have a number of options, the easiest way is probably to just create an SF StandardForm (using "Add New Item"), drop a gradient form header on it and then drop your MaintenanceFormToolStrip subclass on the form.

For all intent and purposes, you now have an SF Maintenance form with a kariMaintenanceFormToolStrip on it Smile

HTH

-=Gary

The items in the form can be modified using code, but it would be nice to be able to modify the MaintenanceFormToolStrip using VS.

What I tried was 

1) create a SF Maintenance Form
2) make the "Modifier"-property "Public"
3) make a new form by inheriting from the form created in step 1

The MaintenanceFormToolStrip doesn't allow it self to be accessed. With a standard button the buttons properties are accessible.

What goes wrong here or is there a better way to achieve this?

TIA,

Kari

By Trent L. Taylor - 4/8/2006

Gary knows what he's talking about Wink  Great answer!