Note: before running this example, initialize the Notify property of TMediaPlayer1 to True.
const
ModeStr: array[TMPModes] of string = ('Not ready', 'Stopped', 'Playing', 'Recording', 'Seeking', 'Paused', 'Open');
procedure TForm1.MediaPlayer1Notify(Sender: TObject);
begin
with Sender as TMediaPlayerdo
begin
Form1.Caption := ModeStr[Mode];
{ Note we must reset the Notify property to True }
{ so that we are notified the next time the }
{ mode changes }
Notify := True;
end;
end;