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

📄 main.pas

📁 《深入Delphi的多媒体编程》实例源代码
💻 PAS
字号:
unit main;

interface

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

type
  TMainForm = class(TForm)
    DriveComboBox1: TDriveComboBox;
    FilterComboBox1: TFilterComboBox;
    DirectoryListBox1: TDirectoryListBox;
    FileListBox1: TFileListBox;
    Label1: TLabel;
    Memo1: TMemo;
    BitBtn1: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
    procedure FileListBox1Click(Sender: TObject);
    procedure Memo1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;

implementation

uses Bigpas;

{$R *.DFM}
procedure TMainForm.FileListBox1Click(Sender: TObject);//选择中文件阅读
begin
 if FileListBox1.FileName<>'' then
  begin
   Memo1.Lines.LoadFromFile(FileListBox1.FileName);
   Label1.Caption:='当前文件是:'+FileListBox1.FileName;
  end;
end;

procedure TMainForm.Memo1Click(Sender: TObject);//放大阅读
begin
 if FileListBox1.FileName<>'' then
  begin
   with BigForm do
    begin
     Memo1.Lines.LoadFromFile(FileListBox1.FileName);
     Caption:=FileListBox1.FileName;
     show;
    end;
  end;
end;

procedure TMainForm.BitBtn1Click(Sender: TObject);//关闭程序
begin
 Close;
end;


end.

⌨️ 快捷键说明

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