くだすれDelphi(超初心者用)その26
■ このスレッドは過去ログ倉庫に格納されています
0360デフォルトの名無しさん
2005/08/04(木) 16:49:28収めようと思っています。そこで、
http://homepage1.nifty.com/MADIA/delphi/delphi_bbs/200301_03010018.html
ここにあるpgetを使ってみました。
procedure TForm1.Button1Click(Sender: TObject);
begin
if Clipboard.HasFormat(CF_BITMAP) then
begin
Image1.Picture.Assign(Clipboard);
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var point:TPoint;
r,g,b:byte;
begin
point.X:=0;
point.Y:=0;
pget(Image1.picture.Bitmap,point,r,g,b);
showmessage('R='+inttostr(r)+' G='+inttostr(g)+' B='+inttostr(b));
end;
Button1でビットマップをペーストできますが、Button2を押した時点で
貼り込んだ画像が消えて常にRGBともにゼロの値しか得られません。
Button2でペースト画像を取得するにはどうしたらよいでしょうか。
■ このスレッドは過去ログ倉庫に格納されています