@Renato_Souza_Delphi, explaining very simply what I had mentioned in the other answer.
In Delphi in the menu bar go to:
Component / Component .
On the next screen choose Import ActiveX Control .
In the next screen, locate the grid :
SelectthenameofthepaletteasyouwishIleftasActiveX
.
OnthenextscreenchoosetheInstallToNewPackageoptionandend.Thenverifythatthecomponentpaletteyoudefinedearlier(step4)wascreatedinDelphi.PutintheFormtheTWindowsMediaPlayer
componentofthisnewpaletteandaTimer
bysettingitaslongasyouwant.GotothepropertyofTWindowsMediaPlayer
andsetitsAlign
property:alClient
.
>Implementation
unit frmPrincipal;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.OleCtrls, WMPLib_TLB, Vcl.StdCtrls,
Vcl.ExtCtrls;
type
TForm1 = class(TForm)
wm: TWindowsMediaPlayer;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
FIndex: Integer;
FLista: TStringList;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
FLista := TStringList.Create;
FIndex := 0;
FLista.Add('arquivo.png');
Flista.Add('arquivo.mp3');
Timer1.Enabled := True;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
FreeAndNil( FLista );
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if FIndex > 1 then
Exit;
wm.URL := FLista.Strings[FIndex];
wm.controls.play;
Inc(FIndex);
end;
end.
This is a simple example of what you can do easily with FLista.Add('arquivo.png')
of windows media player, there are numerous methods and resources that you can implement any doubt is just talk, could not detail and write a consistent code for lack of time but I hope you got the idea.