delphi 转换为vb高手帮忙(200)

  • 主题发起人 主题发起人 hongshanwdj
  • 开始时间 开始时间
H

hongshanwdj

Unregistered / Unconfirmed
GUEST, unregistred user!
sddhexfile:=sdirfile0+'/ss.dat'; AssignFile(F2, sddhexfile); if FileExists(sddhexfile) then begin Reset(F2, 1); while not Eof(F2) do BlockRead(F2, ssc, SizeOf(char), NumRead); end else Rewrite(F2,1); DateSeparator := '/'; DateTimeToString(dadate, 'MM/dd/yyyy',Fdati); DateTimeToString(datims, 'hh:mm:ss',Fdati); BlockWrite(F2, Fdati, SizeOf(Tdatetime), NumWritten); k:=xuhao-1; BlockWrite(F2, k, SizeOf(integer), NumWritten); for i:=0 to xuhao-2 do begin sa:=format('%7s',[zhongliang.chehao] ); sb:=format('%5s',[zhongliang.chexing] ); weight:=StrToFloat(zhongliang.zl); speed:=StrToFloat(zhongliang.sd); BlockWrite(F2, weight, SizeOf(Double), NumWritten); BlockWrite(F2, speed, SizeOf(Double), NumWritten); duche:=pchar(sa); for iche:=0 to 6 do begin BlockWrite(F2, duche^, SizeOf(char), NumWritten); inc(duche); end; duche:=pchar(sb); for iche:=0 to 4 do begin BlockWrite(F2, duche^, SizeOf(char), NumWritten); inc(duche); end; end; CloseFile(F2);说明:高手请帮忙,把上述delphi代码生成的ss.dat'文件用vb读出来用字符形式显示在List框里格式要求如下:Fdati 1 weight speed sa sb 2 weight speed sa sb 3 weight speed sa sb ...........
 
后退
顶部