(四)创建抓取图象的单元文件scrncpt
interface 【程序编程相关:IT监理与项目管理】
unit scrncpt; 【推荐阅读:数据结构的学习心得】
【扩展信息:ofbiz——工作流学习笔记一(xpdl】uses windows,forms,controls,classes,graphics;
function capturescreenrect(arect:trect):tbitmap; function capturescreen:tbitmap; function captureclientimage(control:tcontrol):tbitmap; function capturecontrolimage(control:tcontrol):tbitmap; function capturewindowimage(wnd:hwnd):tbitmap;implementation
function capturescreenrect(arect:trect):tbitmap;
var screendc:hdc; //设备描述表的句柄 begin result:=tbitmap.create ; with result,arect do begin width :=right-left; height:=bottom-top; screendc:=getdc(0); //获取一个窗口的设备描述表的句柄,0参数返回屏幕窗口设备描述表的句柄 try ... 下一页