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

📄 unit9.pas

📁 基于delphi媒体播放器的源代码 很全面
💻 PAS
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -