S
shuoshuo
Unregistered / Unconfirmed
GUEST, unregistred user!
bmp:TBitbmp;
m:TMemoryStream;
Clpbrd:TClipboard;
procedure TForm1.Button1Click(Sender: TObject); //将粘贴板内的图形
begin 信息存到变量m里
clpbrd := TClipBoard.Create;
if clpbrd.HasFormat(CF_BITMAP) then
begin
bmp := Tbitmap.Create;
clpbrd.GetAsHandle(bmp.handle);
m := TMemoryStream.Create;
bmp.SaveToStream(m);
bmp.Free;
Label1.Caption:='ok!';
end;
end;
procedure TForm1.Button2Click(Sender: TObject); //将变量m里的内容
begin 放回粘贴板
bmp:=TBitMap.Create;
m.position := 0;
bmp.LoadFromStream(m);
ClipBoard.Assign(bmp);
bmp.Free;
end;
为什麽将变量m的内容放回粘贴板后,选择粘贴时win98报错!‘获取粘贴板数据出错!’各位高手请帮我看看!
m:TMemoryStream;
Clpbrd:TClipboard;
procedure TForm1.Button1Click(Sender: TObject); //将粘贴板内的图形
begin 信息存到变量m里
clpbrd := TClipBoard.Create;
if clpbrd.HasFormat(CF_BITMAP) then
begin
bmp := Tbitmap.Create;
clpbrd.GetAsHandle(bmp.handle);
m := TMemoryStream.Create;
bmp.SaveToStream(m);
bmp.Free;
Label1.Caption:='ok!';
end;
end;
procedure TForm1.Button2Click(Sender: TObject); //将变量m里的内容
begin 放回粘贴板
bmp:=TBitMap.Create;
m.position := 0;
bmp.LoadFromStream(m);
ClipBoard.Assign(bmp);
bmp.Free;
end;
为什麽将变量m的内容放回粘贴板后,选择粘贴时win98报错!‘获取粘贴板数据出错!’各位高手请帮我看看!