⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmabortprint.pas

📁 Apprehend Screen Capture Component Version 4.2 A non-visible component to capture images. Freeware w
💻 PAS
字号:
//------------------------------------------------------------------------------
//  ApprehendDemo
//  Copyright (c) 2000 : Copyright Adirondack Software & Graphics 1996-2001
//  Created            : 12-30-2000
//  Last Modification  : 04-10-2001
//  Description        : Printer Abort Unit
//  Requires           : DFSEllipsis Panel Component
//------------------------------------------------------------------------------

unit frmAbortPrint;

interface

uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
   StdCtrls, ExtCtrls, ElpsPanl;

type
   TfrmAbort = class(TForm)
      Button1: TButton;
      Bevel1: TBevel;
      Label1: TLabel;
      PrintStatus: TdfsEllipsisPanel;
      Image1: TImage;
      procedure FormKeyDown(Sender: TObject; var Key: Word;
         Shift: TShiftState);
      procedure Button1Click(Sender: TObject);
      procedure FormShow(Sender: TObject);
   private
    { Private declarations }
   public
    { Public declarations }
      Aborted: Boolean;
   end;

var
   frmAbort: TfrmAbort;

implementation

{$R *.DFM}

uses Printers;

procedure TfrmAbort.FormKeyDown(Sender: TObject; var Key: Word;
   Shift: TShiftState);
begin
   if (Key = VK_ESCAPE) and Printer.Printing then
   begin
      Aborted := True;
      frmAbort.Hide;
      if Printer.Printing then
         MessageDlg('Printing aborted', mtInformation, [mbOK], 0);
   end;
end;

procedure TfrmAbort.Button1Click(Sender: TObject);
begin
   Aborted := True;
   frmAbort.Hide;
   if Printer.Printing then
      MessageDlg('Printing aborted', mtInformation, [mbOK], 0);
end;

procedure TfrmAbort.FormShow(Sender: TObject);
begin
   Aborted := False;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -