�������أ��������ḻ�ȫ������վ��

��ҳ �� ���̿��� �� Delphi �� ����Delphi����Ļץͼ������ʵ��

����Delphi����Ļץͼ������ʵ��

���������������� ��Դ����վʱ�䣺2010/10/14 10:19:59������С��A-A+

����

���ߣ���������������1330�����ۣ�0����ǩ��

      �������缼���ķ��ٷ�չ�������������ڸ��ߵ�ԺУ��ѧ�е�ʹ���ѷdz��ձ飬���ǣ����Ƿ���һ�����⣬�ڽ�ѧ�Ĺ����У�������ʦ��������ѧ������������ѧ������������ʾ����������ʱ�鿴ѧ����������ʾ���ϵ����ݣ����ԣ��е�ѧ���ڽ�ѧ��͵����Ϸ��Ӱ���˽�ѧ��������Ч�������ˣ�����һ��������������������ѧ����������ʮ�ֱ�Ҫ��Ϊ��ʵ����һĿ�ģ���ϵͳӦ�������¹��ܣ�
������1����ʦ�û�����ѭ����ʾѧ������������ʾ���ϵĻ��档
������2����ʦ�û����Զ�̬��ʾijһѧ������������ʾ���ϵĻ��档
������3����ʦ�û����Զ�ѧ���ü���������������Ϣ�Ϳ�����Ϣ��
������4��ѧ���ü����������Զ����з����˼��س�����
������5��Ϊ�˷�ֹѧ���ü������ķ����˼��س��򣬱�ѧ��������Ctrl+Alt+Del�رգ���Ctrl+Alt+Del�Ի����б������س�����ͬʱ��Ӧ�����س������������İ�ť��
�������Ľ���Ӧ��ʵ�����ص������ҽ�����Delphi7.0�п��Բ��õ�����ʵ����Ļץͼ�����IJ���������
��������ʵ��
������1��ץȡ��Ļͼ�����ѵ���������һ�����ζ�ȡ��Ļ�ľ���������֪����Ļ���������λ�ȡ��Ļ��ͼ����Borland��˾��������Ա�û�����Tcanvas��������װ��Windows�Ĵ󲿷�ͼ���������ܣ�����ͨ�����Ը�ֱ�۵ķ�ʽ��Windows����Ļ�򽻵��������ع�������ͷ�۵�Windows API�����������������£�

procedure TForm1.Timer1Timer(Sender��TObject)��//ץȡ��Ļ�������浽Image�ؼ���
var
��Fullscreen��Tbitmap��
��FullscreenCanvas��TCanvas��
��dc��HDC��
begin
��Fullscreen��=TBitmap.Create��
��//����һ��BITMAP������ͼ��
��Fullscreen.Width��=screen.width��
��Fullscreen.Height��=screen.Height��
��DC��=GetDC(0)�� //ȡ����Ļ��DC������0ָ������Ļ
��FullscreenCanvas��=TCanvas.Create��
��//����һ��CANVAS����
��FullscreenCanvas.Handle��=DC��
��Fullscreen.Canvas.CopyRect(Rect(0��0��screen.Width��screen.Height)��
��fullscreenCanvas��Rect(0��0��Screen.Width��Screen.Height))��
��//��������Ļ���Ƶ�BITMAP��
��FullscreenCanvas.Free��
��//�ͷ�CANVAS����
��ReleaseDC(0��DC)�� //�ͷ�DC
��//*******************************
��image1.picture.Bitmap��=fullscreen�� //�����µ�ͼ�󸳸�IMAGE����
��image1.Width��=fullscreen.Width��
��image1.Height��=fullscreen.Height��
��fullscreen.free�� //�ͷ�bitmap
��form1.WindowState��=wsNormal�� //��ԭ����״̬
��form1.show�� //��ʾ����
��messagebeep(1)�� //BEEP��һ��������ͼ���Ѿ���ȡ���ˡ�
end��

������2��Delphi�ĵ������ؼ�ScreenCapture������һ���ܺõ����ѵĽ�ͼ�ؼ�����������ץȡ������С��ȫ����Ȼ�У�����Ļ���κ�λ�ã���������������ͼ������״���Լ��ú���ģʽ��ͼ���������ܵ�����TcmWindowģʽ��ͼ��ʹ�÷dz��򵥣�ʹ��Ч��������������ץͼ����SnagIt32������

procedure TForm1.BtnStartClick(Sender��TObject)��
begin
��ScreenCapture1.start�� //��ʼ��ͼ
end��

��//����ȡ��Ļ�ɹ�ʱ�����¼�����
��procedure TForm1.ScreenCapture1Capture(Sender��TObject��Bitmap��TBitmap)��
begin
��//�����������ڵĴ�С����Ӧ�ػ�ͼ���Ĵ�С
��Scrollbox1.HorzScrollBar.Range��= Image1.width��
��Scrollbox1.VertScrollBar.Range��= Image1.height��
end��

procedure TForm1.FormCreate(Sender��TObject)��
begin
��//����entntacp.dll�ļ�
��BtnStart.enabled��= ScreenCapture1.dllavailable��
��//��ʾ�汾��Ϣ
��caption��= '��Ļץͼ����' + ScreenCapture1.version��
end��

//��û���㹻���ڴ�֧�ֽ�ȡ��Ļʱ�����¼�����
procedure TForm1.ScreenCapture1Error(Sender��TObject)��
begin
��MessageDlg('��Ļ��ȡʱ����һ�����������ر�����Ӧ�ó����Ի��ø����ڴ���Դ.'����mtError��[mbOK]��0)��
end��

��//���û���“Esc”������ȡ����Ļ��ȡʱ�����¼�����
procedure TForm1.ScreenCapture1UserCancelled(Sender��TObject)��
begin
��MessageDlg('�û�ȡ����Ļ��ȡ��'��mtInformation��[mbOK]��0)��
end��

�������г�����Ч����ͼ1��ͼ2��ʾ��

delphi��ĻץͼЧ��
ͼ1������Ч��ͼ
ʵ��ץͼ����Ч��ͼ
ͼ2��ץȡͼ������Ч��ͼ

��������
����ͨ�����������ֳ��������ĵ������У�ʹ�õ������ؼ��ķ�������������ʵ�֣����еij�������ȫ����Win2000��Delphi7.0�����µ���ͨ����

��������

�Ķ����ĺ�����ʲô����? ���� �˸�������!

  • 2791 ϲ��ϲ��
  • 2101 ����
  • 800 �ѹ��ѹ�
  • 1219 ����
  • 4049 Χ��Χ��
  • 5602 ��������
��������
��������
�������� �鿴��������(0)
�dz�:
����: ���� �� �� �Ҳ�Ҫ ���� �� ������ �ͻ� ʺ ����
����: 0/500 (����������Ҫ�������˲�����ʾ)

���ೣ������