1,931 questions
create another inheritance form in between.
BaseForm → FormA, FormB, FormC, FormD
BaseForm → BaseForm2 → FormA, FormB, FormC, FormD
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi ,
i have a project with 4 windows forms all of doing everything separate work . but they all a common thing in them .
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == (Keys.F2))
{
// call date form
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
how can make sure that all the forms have this functionality but choose not to write same code 4 times . also i cannot use inheritance as all these forms already inherits from some other parent forms .
create another inheritance form in between.
BaseForm → FormA, FormB, FormC, FormD
BaseForm → BaseForm2 → FormA, FormB, FormC, FormD