L
liuzt23
Unregistered / Unconfirmed
GUEST, unregistred user!
毕业设计演示的要求是两台电脑间的模拟.我做的是指纹门禁的控制软件.要求是:如果我收到01.(开门指令)我就发送开门的指令.就发送0F...
我在一个例子上弄了这样的程序
发送
procedure TForm1.Button1Click(Sender: TObject);
begin
Comm1.WriteCommData(Pchar(Memo1.Text),Length(Memo1.Text));
end;
接收
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
var
ReceivedString:String;
begin
SetLength(ReceivedString,Bufferlength);
Move(Buffer^,PChar(ReceivedString)^,BufferLength);
Memo2.Text:=ReceivedString;
end;
这样子,能不能实现一个一个字节的发送和接收?
还有这样子在Memo中能实现吗?
是不是还要在接收或发送间汤加延时的?
我在一个例子上弄了这样的程序
发送
procedure TForm1.Button1Click(Sender: TObject);
begin
Comm1.WriteCommData(Pchar(Memo1.Text),Length(Memo1.Text));
end;
接收
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
var
ReceivedString:String;
begin
SetLength(ReceivedString,Bufferlength);
Move(Buffer^,PChar(ReceivedString)^,BufferLength);
Memo2.Text:=ReceivedString;
end;
这样子,能不能实现一个一个字节的发送和接收?
还有这样子在Memo中能实现吗?
是不是还要在接收或发送间汤加延时的?