3) 형태 또는 제어 그림을 기어 다닙니다
양식 또는 제어 이미지, 즉 새로운 Form2를 사용하려면 "Delphi Image Intercept 프로그래밍 예 (7)"을 참조하십시오.
주 단위 구현의 사용에 capture2를 추가하십시오.
[Windows 또는 Controls 캡처] 양식 또는 컨트롤 캡처에 대한 액션 이벤트
절차 tmainform.cptwindowsexecute (sender : tobject);
var p : tpoint; 핸들 : hwnd;
시작하다
Inc (Capturenum, 1);
application.minimize;
지연 (500);
filename : = 'capture'+inttostr (capturenum);
filename : = DefaultDirectory+filename;
tform2.create (응용 프로그램)를 사용하여
노력하다
showmodal = mrok라면
시작하다
CreatemDichild (Filename, True);
statusbar.simpletext : = filename;
지연 (500);
abitmap : = tbitmap.create;
getCursorpos (P);
핸들 : = Windowfrompoint (P);
ABITMAP : = CAPTUREWINDOWIMAGE (Handles);
child.image1.picture.bitmap : = abitmap;
child.clientwidth : = child.image1.picture.width;
child.clientheight : = child.image1.picture.height;
child.horzscrollbar.range : = child.image1.picture.width;
child.vertscrollbar.range : = child.image1.picture.height;
child.image1.hint : = '높이 :'+inttostr (child.image1.picture.height)+'픽셀'
+'width :'+inttostr (child.image1.picture.width)+'픽셀';
abitmap.free;
끝;
마지막으로
무료;
application.restore;
끝;
끝;
4) 크롤링 아이콘 사진
아이콘 사진, 즉 새로운 Form3을 사용하려면 "Delphi Image Intercept Programming Example (8)"을 참조하십시오.
주 단위 구현의 사용에 capture3를 추가하십시오.
주 단위에 개인 프로세스 캡처 컨트 컨트리 콘 추가 :
절차 tmainform.captureicon;
시작하다
tform3.create (응용 프로그램)를 사용합니다
노력하다
showmodal = mrok라면
Frect가 시작됩니다
if (오른쪽> 왼쪽)과 (하단> 상단)를 시작합니다
지연 (300);
abitmap : = tbitmap.create;
abitmap.assign (capturescreenrect (frect));
child.image1.picture.bitmap : = abitmap;
child.horzscrollbar.range : = child.image1.picture.width;
child.vertscrollbar.range : = child.image1.picture.height;
abitmap.free;
끝이 시작됩니다
MessagedLg ( '국경 선택 오류, 다시 시도하십시오!', mtinformation, [mbok], 0);
child.close;
form3.free;
출구;
끝;
끝;
마지막으로
무료;
끝;
끝;
[아이콘 캡처] 아이콘 캡처 사진의 액션 이벤트
절차 tmainform.cpticonexecute (발신자 : tobject);
시작하다
application.minimize;
지연 (400);
Inc (Capturenum, 1);
filename : = 'capture'+inttostr (capturenum);
filename : = DefaultDirectory+filename;
CreatemDichild (Filename, True);
statusbar.simpletext : = filename;
캡처 콘;
child.clientwidth : = child.image1.picture.width;
child.clientheight : = child.image1.picture.height;
child.horzscrollbar.range : = child.image1.picture.width;
child.vertscrollbar.range : = child.image1.picture.height;
child.image1.hint : = '높이 :'+inttostr (child.image1.picture.height)+'픽셀'
+'width :'+inttostr (child.image1.picture.width)+'픽셀';
application.restore;
끝;