Autor Beitrag
timfinn
Hält's aus hier
Beiträge: 14



BeitragVerfasst: Di 18.01.05 21:49 
also hier ein meiner meinung nach zumindest compilierbarer quellcode:
delphi sagt allerdings immer "undeclared identifier: TIdSocketHandle".
kann doch nicht sein, die verantwortlichen units sind doch drin!

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, unit2, Sockets, IdUDPServer, IdBaseComponent,
  IdComponent, IdUDPBase, IdUDPClient;

type
  TForm1 = class(TForm)
    GroupBox2: TGroupBox;
    GroupBox3: TGroupBox;
    edtclientip: TEdit;
    edtclientport: TEdit;
    Button2: TButton;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    ListBox1: TListBox;
    edtnachricht: TEdit;
    Button3: TButton;
    Button1: TButton;
    IdUDPClient1: TIdUDPClient;
    IdUDPServer1: TIdUDPServer;
    procedure IdUDPServer1UDPRead(Sender: TObject; AData: TBytes;
      ABinding: TIdSocketHandle);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}



procedure TForm1.Button1Click(Sender: TObject);
begin
form2.show
end;




procedure TForm1.Button3Click(Sender: TObject);
begin
idudpclient1.Active := true;
idudpclient1.send := edtnachricht.text;
idudpclient1.active := false;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
idudpserver1.active := true;
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
idudpserver1.active := false;
end;

procedure TForm1.IdUDPServer1UDPRead(Sender: TObject; AData: TBytes;
  ABinding: TIdSocketHandle);
begin

end;

end.
MAlsleben
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 303

W2k,WinXP
D3 - DXE3 Enterprise
BeitragVerfasst: Mi 19.01.05 17:16 
Hi,

Du mußt von Hand noch die Unit IdSocketHandle in die uses Klausel mit aufnehmen.

_________________
Viele Wege führen nach Rom.