Delphi 在电脑屏幕上显示图片


本文整理自网络,侵删。

 
procedure TForm1.Button1Click(Sender: TObject);
var
aCanvas:TCanvas;
 i:Tbitmap;
begin
aCanvas:=TCanvas.Create;
i:=tbitmap.Create;
i.LoadFromFile('c:\1.bmp');
    try
   aCanvas.Handle:=GetDC(0);//把桌面给acanvas
   aCanvas.Draw(480,300,i);

   finally
     aCanvas.Free;
    end;
end;

相关阅读 >>

Delphi idhttp封装得post get函数

Delphi 读取图像文件base64编码加载到image组件显示图片

Delphi调用阿里云的对象存储服务oss

Delphi 获取ie中选项卡标题

Delphi内存映射大文件

Delphi 关于选择文件路径 selectdirectory 弹出窗口居中的问题

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

postmessage和sendmessage的区别

Delphi 把字符串复制到剪贴板

Delphi xe 关闭android应用

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



打赏

取消

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

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

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

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

评论

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