unit9.pas
来自「基于delphi媒体播放器的源代码 很全面」· PAS 代码 · 共 63 行
PAS
63 行
unit Unit9;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, FileCtrl, Buttons;
type
TForm9 = class(TForm)
DirectoryListBox1: TDirectoryListBox;
DriveComboBox1: TDriveComboBox;
BitBtn1: TBitBtn;
FileListBox1: TFileListBox;
procedure BitBtn1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form9: TForm9;
implementation
uses unit1,msgunit4;
{$R *.dfm}
procedure TForm9.BitBtn1Click(Sender: TObject);
var
count:integer;
begin
if FileListBox1.Count<>0 then
begin
for count:=0 to FileListBox1.Count-1 do
begin
if (pos('.mp3',FileListBox1.Items.Strings[count])<>0)or(pos('.MP3',FileListBox1.Items.Strings[count])<>0)or(pos('.wma',FileListBox1.Items.Strings[count])<>0)or(pos('.WMA',FileListBox1.Items.Strings[count])<>0)or(pos('.wav',FileListBox1.Items.Strings[count])<>0)or(pos('.WAV',FileListBox1.Items.Strings[count])<>0)or(pos('.mid',FileListBox1.Items.Strings[count])<>0)or(pos('.MID',FileListBox1.Items.Strings[count])<>0) THEN
begin
Form1.CheckListBox1.Items.Add(DirectoryListBox1.Directory+'\'+FileListBox1.Items.Strings[count]);
form1.CheckListBox1.ItemIndex:=count;
end;
end;
Form1.CheckListBox1.Items.SaveToFile(ExtractFileDir(application.ExeName)+'\mplay.dll');
Close;
end
else
begin
form4.Label1.Caption:='没有播放文件存在! ';
form4.ShowModal;
end;
end;
procedure TForm9.FormShow(Sender: TObject);
begin
form9.Top:=form1.Top;
form9.Left:=form1.Left;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?