Take the 2-minute tour ×

Compiling (make or build) often takes several seconds or minutes.

I'd like to set up my IDE, RAD Studio XE2, to play a sound when it finishes compiling. Even better if I could set different sounds in case of success or failure in compilation.

share|improve this question
add comment

1 Answer

up vote 12 down vote accepted


To get a beep when you're done building, do this:

  1. Go to the project options (ctrl+shift+F11)
  2. Go to Build Events
  3. Go to Post-Build Events/commands
  4. Paste: RunDll32.exe user32.dll,MessageBeep

It uses rundll32.exe to directly call MessageBeep in user32.dll. It's light-weight, and it's pretty sure that it'll work on your system.



If you want a fancy mp3 you could call winamp, or you can hack something together yourself.


If you're feeling more adventurous, you can let your pc talk to you when it's done building. You don't have to install anything for it; your pc already has SAPI.

The example in the screenshot tells you Done compiling when you're done. You can have let it tell you the build time, the output filename, etc.

Have fun! :-)


share|improve this answer
Your rundll32 approach, although it apparently works, is dangerous because MessageBeep() does not match the function signature that rundll32 requires for calling DLL functions. I would instead suggest having the PostBuild event execute a .bat script that uses the start command to play a .wav or other audio file instead. –  Remy Lebeau Mar 13 '13 at 5:29
add comment

Your Answer


