鸟
鸟人和天使
Unregistered / Unconfirmed
GUEST, unregistred user!
代码:
procedure TForm1.Button1Click(Sender: TObject);varstr:string;begin str:='aaaaaaa'; mint:=0; CommPortDriver1.SendString(str); Sleep(100); Edit1.Text:=IntToStr(mint);//我需要的是第一次按下click先进入数据接收函数,再运行到这end;procedure TForm1.FormCreate(Sender: TObject);begin CommPortDriver1.Connect;//打开串口end;procedure TForm1.CommPortDriver1ReceiveData(Sender: TObject; DataPtr: Pointer; DataSize: Integer);begin mint:=datasize;end;