You are here: Home > > Membuat Mp3 dengan skin dan list

Membuat Mp3 dengan skin dan list

Ini kode saya buat bersama teman saya ,.
dan bagi yang ingin mengembangkannya,silahkan bisa di kembangkan,.,.
Mengunakan komponen skin manajer dan mengunakan data base notepad


procedure TForm1.Button1Click(Sender: TObject);
begin
OpenDialog1.Execute;
ListBox1.AddItem(OpenDialog1.FileName,Sender);
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
MediaPlayer1.Stop;
end;

procedure TForm1.Button2Click(Sender: TObject);
var
sl:TStringList;
i:integer;
begin
 sl := TStringList.Create;
  sSkinManager1.GetSkinNames(sl);

  ListBox2.Clear;
  for i := 0 to sl.Count - 1 do begin
    ListBox2.Items.Add(sl[i]);
end;
end;
procedure TForm1.ListBox2DblClick(Sender: TObject);
begin
sSkinManager1.SkinName:=ListBox2.Items[ListBox2.Itemindex];
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
if MediaPlayer1.Position=MediaPlayer1.Length then
begin
try
MediaPlayer1.FileName:=ListBox1.Items[ListBox1.itemindex+1];
  if MediaPlayer1.FileName='' then
  begin
     MediaPlayer1.FileName:=ListBox1.Items.Strings[0];
     MediaPlayer1.Open;
     MediaPlayer1.Stop;
     MediaPlayer1.Play;
  end
  else
        begin
          MediaPlayer1.Open;
          MediaPlayer1.Stop;
          MediaPlayer1.Play;
          ListBox1.Items.Exchange(ListBox1.ItemIndex,ListBox1.ItemIndex+1);
        end;


except

end;
end;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
if ListBox1.Items.Text <> '' then
Timer1.Enabled:=true;
if Timer1.Enabled=true then
end;

procedure TForm1.ListBox1DblClick(Sender: TObject);
begin
MediaPlayer1.FileName:=ListBox1.Items[ListBox1.itemindex];
MediaPlayer1.Open;
MediaPlayer1.Stop;
MediaPlayer1.Play;
Button4.Enabled:=true;
end;

procedure TForm1.bthapusClick(Sender: TObject);
begin
ListBox1.Items.Delete(ListBox1.ItemIndex);
end;

procedure TForm1.Button6Click(Sender: TObject);
var
sl:TStringList;
i:integer;
begin
sPathDialog1.Execute;
sSkinManager1.SkinDirectory:=sPathDialog1.Path;
 sl := TStringList.Create;
  sSkinManager1.GetSkinNames(sl);
   ListBox2.Clear;
  for i := 0 to sl.Count - 1 do begin
    ListBox2.Items.Add(sl[i]); end;
end;

procedure TForm1.Button5Click(Sender: TObject);
var
list:TStringList;
begin
list:= TStringList.Create;
list.Clear;
list.Add(ListBox1.Items.Text);
list.SaveToFile(Extractfilepath(Application.exename)+'listlagu.txt');
end;

procedure TForm1.Button7Click(Sender: TObject);
begin
ListBox1.Items.LoadFromFile(Extractfilepath(Application.exename)+'listlagu.txt');
end;

procedure TForm1.Button8Click(Sender: TObject);
begin
TopMostWindow1.AlwaysOnTop:=true;
end;

end.
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

0 Responses to “Membuat Mp3 dengan skin dan list”:

Leave a comment