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

📄 inputdlg.pas

📁 一个磁盘文件被删除后恢复的源程序! 内嵌汇编代码~!
💻 PAS
字号:
unit inputdlg;

interface

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

type
  TInputForm = class(TForm)
    Button1: TButton;
    Button2: TButton;
    PromptLabel: TLabel;
    InputEdit: TEdit;
  private
    { Private declarations }
    function Execute: Boolean;

  public
    { Public declarations }
    function GetString(title, prompt: string; var s: string): Boolean;
    function GetInteger(title, prompt: string; var i: Integer): Boolean;
  end;

var
  InputForm: TInputForm;

implementation

{$R *.DFM}

function TInputForm.Execute: Boolean;
begin
  InputEdit.Text := '';
  Result := ShowModal = mrOk;
end;

function TInputForm.GetString(title, prompt: string; var s: string): Boolean;
begin
  caption:=title;
  PromptLabel.Caption := prompt;
  Result := InputForm.Execute;
  if Result then
    s := InputEdit.Text;
end;

function TInputForm.GetInteger(title, prompt: string; var i: Integer): Boolean;
begin
  Caption:=title;
  PromptLabel.Caption := prompt;
  Result := InputForm.Execute;
  if Result then
    i := StrToInt(InputEdit.Text);
end;

end.

⌨️ 快捷键说明

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