Urgent | How to call Delphi DLL using CSharp.Net

A

Anoop

Hi All,
I have a GUI module written in Delphi32. There is another main
application written in CSharp.Net. I want to call the delphi GUI Form from
with in CSharp.Net Code. The .Net application will provide the top level
container for the Delphi GUI module. The Delphi form will be invoked in the
following way:
1. A menu Item in the .Net [to call delphi module] container will trigger an
event
2. From with in the event handler I will call Delphi Dll Form and display it
as MDI Child

How can I do this integration? Any pointers would be highly appreciated!!

Regards!
-Anoop
 
W

Wiebe Tijsma

You'll have to create a COM wrapper, or other kind of interface for your
GUI module to achieve this.
 
N

Noah Sham

Google groups for 'How to get main for handle in .net'

Heres the example from the thread:

DllImport("user32.dll", SetLastError = true)]
private static extern bool ShowWindowAsync(IntPtr window, int cmd);
IntPtr hWnd = MyWindow.Handle; // must be a valid window handle
int SW_SHOW = 5;
bool success = ShowWindowAsync(hWnd, SW_SHOW);
 
A

Anoop

I have never used COM. How should I create a COM wrapper? If someone have
ever done this kind of integration [C#.Net, Delphi] and could send me the
exact steps to be followed?

Wiebe Tijsma said:
You'll have to create a COM wrapper, or other kind of interface for your
GUI module to achieve this.
Hi All,
I have a GUI module written in Delphi32. There is another main
application written in CSharp.Net. I want to call the delphi GUI Form from
with in CSharp.Net Code. The .Net application will provide the top level
container for the Delphi GUI module. The Delphi form will be invoked in the
following way:
1. A menu Item in the .Net [to call delphi module] container will trigger an
event
2. From with in the event handler I will call Delphi Dll Form and display it
as MDI Child

How can I do this integration? Any pointers would be highly appreciated!!

Regards!
-Anoop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top