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

📄 fm_openfile.pas

📁 档案资料管理系统
💻 PAS
字号:
unit FM_OpenFile;

interface

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

type
  TFM_OpenFile1 = class(TForm)
    GroupBox1: TGroupBox;
    ListBox1: TListBox;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    procedure FormCreate(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FM_OpenFile1: TFM_OpenFile1;

implementation
uses
 FM_People,FM_Main;
{$R *.dfm}

procedure TFM_OpenFile1.FormCreate(Sender: TObject);
var
 FMOpenFileSearch:TSearchRec;
 FMOpenFileNamePath:string;
begin
 FMOpenFileNamePath:=ExtractFilePath(Application.ExeName)+'\Otherfile\SaveFile\';
 if FindFirst(FMOpenFileNamePath+'*.',faDirectory,FMOpenFileSearch) = 0 then
    begin
     repeat
      if(FMOpenFileSearch.Name[1]<>'.') then
         begin
          ListBox1.Items.Add(FMOpenFileSearch.Name);
         end;
      until FindNext(FMOpenFileSearch) <> 0;
      FindClose(FMOpenFileSearch);
    end;
end;
procedure TFM_OpenFile1.BitBtn1Click(Sender: TObject);
var
 FMPeople:TFM_People1;
begin
 if ListBox1.ItemIndex<>-1 then
   begin
    FMPeople:=TFM_People1.Create(Self);
    FMPeople.Show;
    FMPeople.EasyGrid1.LoadFromFile(ExtractFilePath(Application.ExeName)+'\Otherfile\SaveFile\'+ListBox1.Items.Strings[ListBox1.ItemIndex]);
    FMPeople.EasyGrid1.ShowColTitle:=False;
    FMPeople.EasyGrid1.ShowRowTitle:=False;
    FMPeople.Label1.Caption:=ExtractFilePath(Application.ExeName)+'\OtherFile\SaveFile\'+ListBox1.Items.Strings[ListBox1.ItemIndex];
    If FM_Main1.MDIChildCount<>0 then
      begin
       FM_Main1.FMMTooB3.Enabled:=True;
       FM_Main1.FMMTooB4.Enabled:=True;
      End;
    Close;
   end
 else
  Application.MessageBox('必须选择一项','真诚提醒您',MB_OK	or MB_ICONINFORMATION)
end;
end.

⌨️ 快捷键说明

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