Delphi鼠标移过放大镜效果


本文整理自网络,侵删。

 procedure TForm1.Timer1Timer(Sender: TObject);
var
p:TPoint;
abc:blendFunction ;
x1,x2,y1,y2:integer;
begin
form1.doublebuffered:=true;
image1.picture.graphic:=Nil;
abc.AlphaFormat:=0;
abc.BlendFlags:=1;
abc.BlendOp:=AC_SRC_OVER;
abc.SourceConstantAlpha:=255;

GetCursorPos(p);
x1:=p.x-20;
x2:=p.x+20;
y1:=p.y-20;
y2:=p.y+20;
//AlphaBlend(image1.Canvas.Handle,0,0,image1.Width,image1.Height,getdc(0),x1,y1,x2,y2,abc);
Windows.AlphaBlend(image1.Canvas.Handle,0,0,image1.Width,image1.Height,getdc(0),x1,y1,50,50,abc);
end;

相关阅读 >>

Delphi 选择文件夹对话框 (有新建文件夹按钮)修正版

Delphi获取其他进程中listbox和combobox的内容

Delphi随机字符(密码生成)函数

Delphi 用代码实现为程序创建快捷方式的二种方法

Delphi xe firemonkey的stylebook皮肤控件的使用

Delphi常用获取系统信息的函数单元

Delphi编写聊天程序

Delphi twebbrowser get html source after ajax load

Delphi jsondataobjects

Delphi原生方法取得文件的md5

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...