<简单问题>怎么让鼠标从一副image中提取颜色 画布image1我在上面随便画些东西怎么让鼠标在相应点点一下,可以获得该点颜色thx 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 很简单的,在鼠标点击事件中。procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);var acolor : TColor;begin acolor := Image1.Canvas.Pixels[x, y];//end; procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);var c:Tcolor;beginif Image1.Picture =nil then exit; c:=Image1.Picture.Bitmap.Canvas.Pixels[X,Y]; showmessage('该点的颜色为:'+ColorToString(c));end; 在用texttospeech控件时,如何判断所读字符是不是英文字符,要实现listbox中出现非英文字符时提示出错 如何使用进度条? 代理服务器的用户认证 急~!!!! 程序在系统托盘有图标,任务栏没有,现有别的窗口覆盖在程序窗口上(非最小化),怎样点击图标是窗体显示出来? 一个方法如何传入一个过程中?? 请介绍几本好的delphi书? 关于同一数据中数据的复制问题~~~! 在Delphi6中如何查询日期为空的记录 如何在局域网内,两台计算机传送大文件。 在线等~关于键盘响应!!!!!(如果有满意答案,立刻结贴) active form 做OCX文件的问题
在鼠标点击事件中。
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
acolor : TColor;
begin
acolor := Image1.Canvas.Pixels[x, y];//
end;
Shift: TShiftState; X, Y: Integer);
var c:Tcolor;
begin
if Image1.Picture =nil then exit;
c:=Image1.Picture.Bitmap.Canvas.Pixels[X,Y];
showmessage('该点的颜色为:'+ColorToString(c));
end;