On May 25, 12:13 pm, Miroslav Stampar <miroslav.stam...@gmail.com>
wrote:
public class FormEx : Form
{
public new void Show()
{
//do your pre-stuff
base.Show();
//do your post-stuff
}
public new void Show(IWin32Window owner)
{
//do your pre-stuff
base.Show(owner);
//do your post-stuff
}
}
Xavier PACOTTE je napisao/la:
Hello,
I would like to add some actions to show function of a form with Visual
Stuio 2005.
Is it possible?
Is it possible to create a new Show function which inherit of old it?
Best Regards.
Hi,
I wouldn't suggest using this solution since it's not polymorphic.
The following code will not do what you need:
Form frm = new Form1();
frm.Show();
Only if frm is of type Form1, the Form1 implementation of Show() will
be called.
Moty