faxcnvid.pas

来自「将图像转换为传真文件」· PAS 代码 · 共 49 行

PAS
49
字号
unit Faxcnvid;

interface

uses
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, AdFaxCvt, StdCtrls;

type
  TfrmFileTypeConfirmation = class(TForm)
    btnOK: TButton;
    btnCancel: TButton;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    cbxFileType: TComboBox;
    lblFileName: TLabel;
  private
    { Private declarations }
  public
    { Public declarations }
    function Execute(const FileName: String) : TFaxInputDocumentType;
  end;

var
  frmFileTypeConfirmation: TfrmFileTypeConfirmation;

implementation

{$R *.DFM}
function TfrmFileTypeConfirmation.Execute(const FileName: String): TFaxInputDocumentType;
begin
  lblFileName.Caption := FileName;
  ShowModal;
  if ModalResult = mrOK then begin
    case cbxFileType.ItemIndex of
      0 : Result := idText;
      1 : Result := idTiff;
      2 : Result := idPcx;
      3 : Result := idDcx;
      4 : Result := idBmp;
      else
        Result := idNone;
    end;                 
  end else
    Result := idNone;
end;

end.

⌨️ 快捷键说明

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