W
wanglonga
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);
var
BmpStream:TMemoryStream;
Buf:array[0..99] of char;
i:integer;
begin
BmpStream:=TMemoryStream.Create;
image1.Picture.Bitmap.SaveToStream(BmpStream);
BmpStream.Position:=0;
for i:=0 to 100 do
begin
BmpStream.ReadBuffer(Buf,100);
showmessage(buf);
end;
end;
为什么每次showmessage出来的buf都不同,这个buf里的内容是每次都累加的?还是每次显示的是往下移动100的?我感觉不象是累加的!也就是说BmpStream.ReadBuffer(Buf,100);
是每循环一次往buf里加100还是buf清空以前的,加入这回的100????
菜鸟刚学啊,请您多批评啊???!!!
var
BmpStream:TMemoryStream;
Buf:array[0..99] of char;
i:integer;
begin
BmpStream:=TMemoryStream.Create;
image1.Picture.Bitmap.SaveToStream(BmpStream);
BmpStream.Position:=0;
for i:=0 to 100 do
begin
BmpStream.ReadBuffer(Buf,100);
showmessage(buf);
end;
end;
为什么每次showmessage出来的buf都不同,这个buf里的内容是每次都累加的?还是每次显示的是往下移动100的?我感觉不象是累加的!也就是说BmpStream.ReadBuffer(Buf,100);
是每循环一次往buf里加100还是buf清空以前的,加入这回的100????
菜鸟刚学啊,请您多批评啊???!!!