I have a form based on mmBusinessForm and if I call the GetActiveForm method to get a reference to the active form, it work great. I can then create an instance of myBusiness Form class and call a form method like below:
Form ActiveFormObj = mmAppDesktop.MainForm.GetActiveForm();
dstBusinessForm BusinessForm = ActiveFormObj as dstBusinessForm;
if (BusinessForm != null)
{
BusinessForm.Search();
}
If I attempt to do the same thing for an mmMaintenanceForm like this:
dstMaintForm MaintForm = ActiveFormObj as dstMaintForm;
I get the following error:
Cannot convert type 'System.Windows.Forms.Form' to 'DST.Bassets.dstMaintForm' via a built-in conversion
How can I get a reference to the active form when it is a mmMaintenanceForm and then call a method from outide the form?
Thanks in advance for any help.
Kind Regards,
Mat