I have a Form named ScanFolder
, and I need another Form, that needs to be very similar to ScanFolder
, so I decided to use form inheritance. But there seems to be some misunderstanding with the constructor.
ScanFolder
looks like:
public partial class ScanFolder : Form
{
public ScanFolder(MainForm parent, bool[] autoModes, GlobalMethods GMethodsClass)
{
//Doing something with parameters
}
}
I tried to inherit Form
like this:
public partial class Arch2 : ScanFolder
{
}
But I get warning Constructor on type 'mhmm.ScanFolder' not found, and also there is an error on Arch2
Form edit mode, where I see a call stack error.
So I tried something like this:
public partial class Arch2 : ScanFolder
{
public Arch2(MainForm parent, bool[] autoModes, GlobalMethods GMethodsClass)
: base(parent, autoModes, GMethodsClass)
{
}
}
But it is still the same.
As you can see, I clearly don't have any idea what I'm doing. What I'm trying to achieve is getting Arch2
to look the same as ScanFolder
, so I can see it in designer view and also override some methods or event handlers.