A
aichuanheyan
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button6Click(Sender: TObject);
var
str : string;
begin
str := edit3.text;
ClientSocket1.Socket.SendText(str);
end;
procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
var
i : integer;
begin
for i:=0 to 4 do
begin
if Socket.ReceiveText='0x00' then
button1.click else if
Socket.ReceiveText='0x01' then
button2.click else if
Socket.ReceiveText='0x02' then
button3.click else if
Socket.ReceiveText='0x03' then
button4.click;
end;
为什么我只有在输入0x00时BUTTON1事件有反映,
而输入0x01 0x02 0x03时都会没反映,我试了几次,
发现 只有最前面的Socket.ReceiveText接收才执行,为什么??
var
str : string;
begin
str := edit3.text;
ClientSocket1.Socket.SendText(str);
end;
procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
var
i : integer;
begin
for i:=0 to 4 do
begin
if Socket.ReceiveText='0x00' then
button1.click else if
Socket.ReceiveText='0x01' then
button2.click else if
Socket.ReceiveText='0x02' then
button3.click else if
Socket.ReceiveText='0x03' then
button4.click;
end;
为什么我只有在输入0x00时BUTTON1事件有反映,
而输入0x01 0x02 0x03时都会没反映,我试了几次,
发现 只有最前面的Socket.ReceiveText接收才执行,为什么??