473,800 Members | 2,529 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 2991
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("user 32.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********@cin ergy.comwrote in message
news:uZ******** ********@TK2MSF TNGP03.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*********@CA PITALStijsma.co mwrote in message
news:eH******** ********@TK2MSF TNGP02.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
1710
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
10818
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; public class A {
3
2279
by: gani | last post by:
hi, how to get the fullpath of created IsolatedStorage directory. thanks. -- gani
10
3176
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'; Function SearchPort (Prm1:LongWord) :LongWord; cdecl; External RFID_103_485IO name 'SearchPort';
1
3487
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 cannot get it worked... (I'm not quite sure if it is delphi dll!) Everything about it you can see at: http://zeus.polsl.gliwice.pl/~eloy/csharp/
9
5555
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 ASP.net app. We are trying to decide if it will be easier just to port some of our code over to Delphi .net or just to re-write the entire thing in C#. From what I've seen at the borland confernce the new Borland IDE looks a lot like the MS .NET...
0
1899
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 emit to dynamically generate classes & method depends on the meta table in the database,here is my situation 1) In One method I generated the code Dynamic IL Code (Depends on the data pass to it), The generated code works for one dataset but does...
7
6501
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 number of screens to be converted are huge, we are aiming minimum regression impact. What could be the best approach? Currently the option of Delphi.Net is ruled out.
0
1089
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 socket. some time error is---"An existing connection was forcibly closed by the remote host" and some time error is--- "A connection attempt failed because the connected party did not properly respond after a period of time, or established...
0
9551
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10251
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10033
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6811
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.