Ver Mensaje Individual
  #3  
Antiguo 26-08-2005
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Reputación: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

Esto puede observarse en la ayuda de Delphi acerca de la propiedad "Notify" de los "TMediaPlayer":

Cita:
Empezado por Ayuda de Delphi - OnNotify, Mode, Notify example
The following code declares an array of strings named ModeStr, indexed by the TMPModes type. The Caption of a form displays the string describing the current mode of the device.

Note: before running this example, initialize the Notify property of TMediaPlayer1 to true.

Código Delphi [-]
 const
   ModeStr: array[TMPModes] of string = ('Not ready', 'Stopped', 
     'Playing', 'Recording', 'Seeking', 'Paused', 'Open');
 
 procedure TForm1.MediaPlayer1Notify(Sender: TObject);
 begin
   with Sender as TMediaPlayer do
   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;
__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita