Data Transfer Between Delphi and WinForms and vice versa

delphi
winforms

(Erich) #1

What I want:-

Winform application is embedded in TPanel in Delphi that I have done!

Now next point what i want is: some data (e.g. Coordinates or numbers) is provided to Delphi Form by some automatic data generator, This data should be passed to the winForm application which is embedded in TPanel of Delphi. This data passing should between these two applications (between Delphi and WinForms) should be fast or with less delay. There should be one data grid in Delphi which takes the data from Automatic data generator (From External source) and pass this data to Winform (in Datagrid).

What is the best way to do it !! Appreciate your help ! Thank you !!


(Theo) #3

You can do it using temporary files


(antonk) #4

Hello

What exactly do you need - to transfer data between two separate applications or to embed one app into another (f.e. to embed WinForms form into a Delphi app)?


(Erich) #6

What I want:-

Winform application is embedded in TPanel in Delphi that I have done!

Now next point what i want is: some data (e.g. Coordinates or numbers) is provided to Delphi Form by some automatic data generator, This data should be passed to the winForm application which is embedded in TPanel of Delphi. This data passing should between these two applications (between Delphi and WinForms) should be fast or with less delay. There should be one data grid in Delphi which takes the data from Automatic data generator (From External source) and pass this data to Winform (in Datagrid).

What is the best way to do it !! Appreciate your help ! Thank you !!


(antonk) #7

Hello

Hydra cannot pass an object from Delphi to .NET or vice versa. After all what would do a Delphi code with a received instance of System.Data.DataTable? It knows nothing about methods and properties it does expose, so it wouldn’t be able to call or access them.

Instead Hydra passes interfaces, not objects. A plugin defines a set of interfaces and then these interfaces are imported into the host app project. Then an object can be created on (f.e.) .NET side and then a pointer to its interface is being passed to a Delphi app. Then Delphi app can work with this object - it can call its methods and properties.

This topic contains a short tutorial how to do this and sample projects: Need a Jumpstart with Delphi XE3 and .NET 2.0 DLL Assemblies Integration

Hope that helps