473,513 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Urgent | How to call Delphi DLL using CSharp.Net

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
Oct 26 '06 #1
3 2976
You'll have to create a COM wrapper, or other kind of interface for your
GUI module to achieve this.

Anoop wrote:
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

Oct 26 '06 #2
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);

"Anoop" <an********@cinergy.comwrote in message
news:uZ****************@TK2MSFTNGP03.phx.gbl...
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


Oct 26 '06 #3
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" <wi*********@CAPITALStijsma.comwrote in message
news:eH****************@TK2MSFTNGP02.phx.gbl...
You'll have to create a COM wrapper, or other kind of interface for your
GUI module to achieve this.

Anoop wrote:
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

Oct 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1693
by: ann | last post by:
could you please give me few information about migration from delphi applications to visual studio. net? thank you, ann
34
10738
by: Kovan Akrei | last post by:
Hi, I would like to know how to reuse an object of a thread (if it is possible) in Csharp? I have the following program: using System; using System.Threading; using System.Collections; ...
3
2263
by: gani | last post by:
hi, how to get the fullpath of created IsolatedStorage directory. thanks. -- gani
10
3142
by: Arda Han | last post by:
I am migrating my some applications from Delphi to C#. But... Yes But I don't know C# professionally. I am using DLL in delphi like this : ..... const RFID_103_485IO = 'Cihaz.dll'; ...
1
3479
by: Piotr Nabielec | last post by:
Hi, I have very big problem with importing delphi dll into C# project... I got a Velleman K8000 card with k8d.dll that makes all communication for me. Now I'm trying to import it into C#, but I...
9
5530
by: Gclinton | last post by:
I'm looking for a comparsion of C# to Delphi .net. My company is about to begin the process of reengineering a Delphi tightly coupled win32 app and a Older Java webclient that uses JSP over to an...
0
1871
by: john | last post by:
Hi,All MS Tech Gurus: I need your help!!! It is the second time I post this message, I need get some feedback ASAP, Please Help!! Thanks a lot in advance. John I have a csharp method, using...
7
6488
by: Sanjay Kedare | last post by:
Hi, I am evaluating various alternatives of converting Delphi (Ver 4.0) screens to C# screens. Are there any tools available for such conversion? if yes how much conversion do they achieve? The...
0
1077
by: alok sengar | last post by:
hi, I have already tried this URL's code "http://www.java2s.com/Code/CSharp/Network/SimpleSNMP.htm" but I am getting error when i am creating a UDP type Socket and recieving packet from this...
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4756
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.