Mscomm问题,为什么我的mscomm的oncomm事件的接收中只有八个字符?我mscomm1.RThreshold:=1;其余的另外在触发oncom事件? Mscomm问题,为什么我的mscomm的oncomm事件的接收中只有八个字符?我mscomm1.RThreshold:=1;其余的另外在触发oncom事件? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, OleCtrls, MSCommLib_TLB;type TForm1 = class(TForm) Memo1: TMemo; Button1: TButton; MSComm1: TMSComm; Button2: TButton; procedure Button1Click(Sender: TObject); procedure MSComm1Comm(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);begin mscomm1.InBufferCount:=0; mscomm1.RThreshold:=1; mscomm1.InputLen:=0; Mscomm1.Settings :='9600,n,8,1'; Mscomm1.CommPort :=1; try mscomm1.PortOpen:=true; except end;end;procedure TForm1.MSComm1Comm(Sender: TObject);var str:string; len:word;begin str:=mscomm1.Input; len:=mscomm1.InBufferCount; memo1.Lines.Add(str+inttostr(len));end;procedure TForm1.Button2Click(Sender: TObject);begin mscomm1.Output:='212312312312';end;end.//代码没 另外InputMode 设为comInputModeBinary mscomm1.RThreshold:=1设为12就可以,不过会引发其他问题,研究中!!! Inno setup 的快捷方式 招聘[深圳] 在XP系统下,d7+dbexpress+mysql时,sqlconnection正常,但sqldateset,不能读取数据库中的表 动态创建的控件释放问题,请进来看看 请问高手!! 赋值如何循环 救救一个郁闷中的初学者 怎样打印form上的内容?非常急,明天就要出去交差了!!!在线等... 没有可用分了!怎么办? 再谈谈日期时间的导入 在MIDAS中怎么调试DLL的中间层呢? 疑惑性能 关于adoquery filter 和 select * from xx where xxx like '%xx%'
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, MSCommLib_TLB;type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
MSComm1: TMSComm;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure MSComm1Comm(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
mscomm1.InBufferCount:=0;
mscomm1.RThreshold:=1;
mscomm1.InputLen:=0;
Mscomm1.Settings :='9600,n,8,1';
Mscomm1.CommPort :=1;
try
mscomm1.PortOpen:=true;
except
end;
end;procedure TForm1.MSComm1Comm(Sender: TObject);
var
str:string;
len:word;
begin
str:=mscomm1.Input;
len:=mscomm1.InBufferCount;
memo1.Lines.Add(str+inttostr(len));
end;procedure TForm1.Button2Click(Sender: TObject);
begin mscomm1.Output:='212312312312';end;end.
//代码没