Delphi Programming Example - FAST ComTec MCDWIN User Manual

Webmca multichannel data processor
Table of Contents

Advertisement

6.3.

Delphi programming example

The example is based on the ICS - Internet Component Suite
http://www.overbyte.be
http://www.rtfm.be/fpiette/indexuk.htm
http://users.swing.be/francois.piette/indexuk.htm
Copyright (C) 1997-2001 by François PIETTE
Rue de Grady 24, 4053 Embourg, Belgium
6.3.1.
TCPTest.dpr
program TCPTest;
uses
Forms,
TCPTestUnit in 'TCPTestUnit.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
6.3.2.
TCPTestUnit.pas
unit TCPTestUnit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, WSocket, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
Memo2: TMemo;
WSocket: TWSocket;
Edit1: TEdit;
Label1: TLabel;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure WSocketDataAvailable(Sender: TObject; ErrCode: Word);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
WSocket.SendStr(Memo1.Text+#0);
end;
procedure TForm1.WSocketDataAvailable(Sender: TObject; ErrCode: Word);
ComTec GmbH
WEBMCA Programming
6-10

Advertisement

Table of Contents
loading

Related Products for FAST ComTec MCDWIN

Table of Contents