filedlg.pas
来自「这是一套全面的网络组件」· PAS 代码 · 共 43 行
PAS
43 行
unit fileDlg;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TFileExistsDialog = class(TForm)
lblCaption: TLabel;
btnReplace: TButton;
btnResume: TButton;
btnCancel: TButton;
public
class function ShowFileDialog(const AFileName: string): Integer;
end;
var
FileExistsDialog: TFileExistsDialog;
implementation
{$R *.dfm}
{ TFileExistsDialog }
class function TFileExistsDialog.ShowFileDialog(
const AFileName: string): Integer;
var
dlg: TFileExistsDialog;
begin
dlg := TFileExistsDialog.Create(nil);
try
dlg.lblCaption.Caption := Format('File already exists %s', [AFileName]);
Result := dlg.ShowModal();
finally
dlg.Free();
end;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?