The software I am working on was originally written in Delphi, and any recent additions to the software have been done in C#. I would like to derive some C# forms from base Delphi forms. I have managed to get most of it working, except when I try to open the Design view of the C# form in Visual Studio 2008 I get an error. The error message is as follows "Constructor on type'base class' not found."
I have done some searching and apparently this is due to the Delphi form not having a default constructor which takes zero arguments. The Delphi TForm class does not have a default constructor which takes zero arguments so I can't just add one to my Delphi form.
The code I have compiles and runs exactly how I need it to, however I will need to be able to add new components to the C# form in the future. Anyone got any ideas on how I can get the Visual Studio design view working?
Here's a very simplified version of what I have:
Delphi Code:
type
TMyDelphiForm = class(TForm)
private
...
public
constructor Create(Sender : TObject);
end;
implementation
Constructor TMyDelphiForm.Create(Sender : TObject);
begin
inherited;
end;
C# Code:
public partial class MyCSharpForm : TMyDelhpiForm
{
public MyCSharpForm(Component sender) : base(sender);
{
InitializeComponent();
}
}
Thanks in advance