procedure TUnit_Call.MSComm1Comm(Sender: TObject);
var
s:string;
begin
// BUSY 占线
// NO DIALTONE 无应答
// NO CARRIER 没有载波信号
case mscomm1.CommEvent of
comEvReceive:
begin
s:=MSComm1.Input;
end;
end;
if s='CONNECT' then //如果对方的Modem自动应答成功.
begin
Unit_call.close; //关闭自己
Lib_wry.InitForm(GForm);//初始化窗体
GForm.ShowModal;//显示操作窗体
end;
end;
为什么从串口接收不到返回来的数据.也就是说,s为什么没有接收到数据,if s='CONNECT' then 好像没有执行.
var
s:string;
begin
// BUSY 占线
// NO DIALTONE 无应答
// NO CARRIER 没有载波信号
case mscomm1.CommEvent of
comEvReceive:
begin
s:=MSComm1.Input;
end;
end;
if s='CONNECT' then //如果对方的Modem自动应答成功.
begin
Unit_call.close; //关闭自己
Lib_wry.InitForm(GForm);//初始化窗体
GForm.ShowModal;//显示操作窗体
end;
end;
为什么从串口接收不到返回来的数据.也就是说,s为什么没有接收到数据,if s='CONNECT' then 好像没有执行.
Reole:variant;
ReOleArr: array of byte;
case mscomm1.CommEvent of
comEvReceive: begin
reole:=mscomm1.Input;
reolearr:=reole;
你用 string不行