I would like to be able to create new windows forms that have some extra functionality built into them automatically via a 'middle man' derived class.
The extra functionality uses a bunch Win32 API calls that hook into some of the controls/events of the form and embed it into another window (like embedding a custom form into a notepad or excel window )
I created a derived class of the Form class with this extra functionality like so:
public class MT4ChartForm : Form
I didn't start a windows form project, I just added Form as the base class of my MT4ChartForm class
The idea here is if I ever needed to create another windows.form to be embeded elsewhere, I would create a new windows form project, which would set me up like:
public class Form1 : Form
And I would simply rename to:
public class Form1 : MT4ChartForm
Hoping to 'inject' MT4ChartForm's functionality into my new form automatically.
The problem is the visual form editor doesn't like it (drops an error screen) , and it probably causes other conflicts in the project settings :(
How can I do achieve what I am trying to do, which doesn't break the rules of C#?