当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: (四)创建抓取图象的单元文件ScrnCpt unit Scrn
 

 

 ·a sample for log4j    »显示摘要«
    摘要:1.some tools tomcat log4j_1.2.9 http://mirrors.xtria.com/apache/logging/log4j/1.2.9/logging-log4j-1.2.9.zip 2. four files a. web.xml add following code to web.xml <servlet> <servlet-name>l......
 ·delphi图象截取编程示例(4)    »显示摘要«
    摘要:(六)tmainform的 (抓图)action 事件1)全屏抓图[capture desktop] action 事件procedure tmainform.cptdesktopexecute(sender: tobject);begin inc(capturenum,1); application.minimize ; //窗体最小化 delay(500); //最小化后延时,为了全屏抓图不把......


Delphi图象截取编程示例(2)

(四)创建抓取图象的单元文件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


...   下一页
 ·delphi图象截取编程示例(6)    »显示摘要«
    摘要:(六)区域抓图窗体创建一个新的form1,保存为capture1.pas。设置属性bordericons的四个属性为false.borderstyle设为bsnone,cursor设为crcross,formstyle设为fsstayontop.添加一个私有变量:fdragging:boolean;两个公共变量:frect:trect,fbmp:tbitmap;form1的作用:在区域抓图时创建,......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE