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

📄 unit4.pas

📁 安全芯加密狗 安全芯加密狗
💻 PAS
字号:
unit Unit4;

interface
{$H+}

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

type
  TListKeyForm = class(TForm)
    ListBox1: TListBox;
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    szPath: String[255];
    { Public declarations }
  end;

var
  ListKeyForm: TListKeyForm;

implementation

{$R *.dfm}

procedure TListKeyForm.Button1Click(Sender: TObject);
var
    i: integer;
begin
    if ListBox1.SelCount <> 1 then
    begin
        MessageBox(Handle, 'Select only 1 item.', 'List Key paths', MB_OK);
        Exit;
    end;


    for i := 0 to ListBox1.Count do
    begin
        if(ListBox1.Selected[i]) then
            Break;
    end;

    szPath := ListBox1.Items[i];
    ModalResult := mrOk;
end;

end.

⌨️ 快捷键说明

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