PlaySystemSound procedure
Return to Introduction  Previous page  Next page
Unit
acUtils  

Declaration
type  
  TacSystemSoundType = (stCustom, stAsterisk, stCloseProgram,  
                        stCriticalStop, stDefaultSound,  
                        stExclamation, stExitWindows,  
                        stMaximize, stMenuCommand, stMenuPopup,  
                        stMinimize, stNewMailNotification,  
                        stOpenProgram, stProgramError, stQuestion,  
                        stRestoreDown, stRestoreUp, stStartWindows);  
 
procedure PlaySystemSound(SndType: TacSystemSoundType;  
   Asynchronous, Looped: Boolean);  

Description
The PlaySystemSound procedure can be used to play default system sound event, specified in "Sounds" applet of Control Panel.  
 
Parameters
SndTypedescribes the action type, to play Wav-files associated with this action.  
Asynchronousspecifies whether you would like to play sound asynchronously with main application thread. Set it to True if you don't want to suspend main application thread during playing of the sound.  
Loopedspecifies whether you would like to play the sound continuously. Set it to False to play the sound only once. Otherwise, if you would like to replay the sound continuously — use StopSystemSound to terminate the sound.  

Note
iiinfo Don't use stCustom SndType. This type can be only used in acWavPlayer component, for playing custom Wav-file uploaded to form. Please see documentation on acWavPlayer component for more information.  

See also
StopSystemSound procedure and acWavPlayer component.