中
中鼎
Unregistered / Unconfirmed
GUEST, unregistred user!
Procedure TFrmOutStore.SendPrint();
Var
ArrOut: Array[0..12] of Byte;
I:integer;
StrDate:String;
begin
Arrout[0]:=$A0;
ArrOut[1]:=$+IntArea+40;
StrDestination:=RightStr(' '+StrDestination,4);
For i:=0 To 3 Do Begin
ArrOut[i+2]:=GetCode(MIDStr(StrDestination,i+1,1));
end;
StrDate:=FormatDateTime('yymmdd',Date);
ArrOut[6]:=$+StrToInt(MIDStr(StrDate,1,2));
ArrOut[7]:=$+StrToInt(MIDStr(StrDate,3,2));
ArrOut[8]:=$+StrToInt(MIDStr(StrDate,5,2));
For I:=0 To 8 Do Begin
ArrOut[9]:=ArrOut[9] Xor ArrOut;
end;
// MsCOMM.Output:=ArrOut;
//If MsCOMm.PortOpen=False Then
// MsCOMM.PortOpen:=True;
//MsCOMM.Output:=ArrOut;
comm1.ComponentIndex:=Arrout;
//if MsCOMM.OutBufferCount <= 0 then
// Exit;
end;
上面我注释的地方是用mscomm,但现在要用spcomm请问怎么转化,谢谢!还有设置那些属性呢??
Var
ArrOut: Array[0..12] of Byte;
I:integer;
StrDate:String;
begin
Arrout[0]:=$A0;
ArrOut[1]:=$+IntArea+40;
StrDestination:=RightStr(' '+StrDestination,4);
For i:=0 To 3 Do Begin
ArrOut[i+2]:=GetCode(MIDStr(StrDestination,i+1,1));
end;
StrDate:=FormatDateTime('yymmdd',Date);
ArrOut[6]:=$+StrToInt(MIDStr(StrDate,1,2));
ArrOut[7]:=$+StrToInt(MIDStr(StrDate,3,2));
ArrOut[8]:=$+StrToInt(MIDStr(StrDate,5,2));
For I:=0 To 8 Do Begin
ArrOut[9]:=ArrOut[9] Xor ArrOut;
end;
// MsCOMM.Output:=ArrOut;
//If MsCOMm.PortOpen=False Then
// MsCOMM.PortOpen:=True;
//MsCOMM.Output:=ArrOut;
comm1.ComponentIndex:=Arrout;
//if MsCOMM.OutBufferCount <= 0 then
// Exit;
end;
上面我注释的地方是用mscomm,但现在要用spcomm请问怎么转化,谢谢!还有设置那些属性呢??