Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Delphi-News aus aller Welt (https://www.delphipraxis.net/58-delphi-news-aus-aller-welt/)
-   -   Sharing data between two Delphi applications (https://www.delphipraxis.net/197427-sharing-data-between-two-delphi-applications.html)

DP News-Robot 6. Aug 2018 12:50

Sharing data between two Delphi applications
 
There are several ways to do so.*In this trick, we will use a file from memory to share a memory area, and be able to send data from one application to the other.*We will create two applications, one which write data and another that receives them.*In particular, we will make that text a TEdit looks the a Label of the other application. Application that writes the data creates a new application put a TEdit (Edit1) form changes the code of the unit of the form by this: unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Edit1: TEdit; procedure FormCreate(Sender: TObject); procedure Edit1Change(Sender: TObject); procedure FormDestroy(Sender: TObject); private {Private declarations} public {Public declarations} end; type TCompartido = record number: Integer; String: String [20]; end; PCompartido = ^ TCompartido; var Form1: TForm1; Shared: PCompartido;

Weiterlesen...


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:00 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz