This works, but I can't find any MailBeep.wav.
Where is the sucker ? :bg
INVOKE PlaySound,chr$('MailBeep'),NULL,SND_ALIAS
SND_ALIAS specifies an alias for a system event. Try searching your registry for the MailBeep key.
the user gets to select the sound in the Control Panel, Sounds and Audio Devices, Sounds tab
most of the default system sounds reside in C:\Windows\Media
it won't be named mailbeep.wav, however
that is a system alias
;System Sound Alias Equates
;
;SND_ALIAS_SYSTEMEXCLAMATION EQU 2153h ;SystemExclamation Exclamation -5845
;SND_ALIAS_SYSTEMASTERISK EQU 2A53h ;SystemAsterisk Asterisk -5843
;SND_ALIAS_SYSTEMQUESTION EQU 3F53h ;SystemQuestion Question -5849
;SND_ALIAS_SYSTEMDEFAULT EQU 4453h ;SystemDefault Default Beep -5824
;SND_ALIAS_SYSTEMEXIT EQU 4553h ;SystemExit Exit Windows -5846
;SND_ALIAS_SYSTEMHAND EQU 4853h ;SystemHand Critical Stop -5847
;SND_ALIAS_SYSTEMSTART EQU 5353h ;SystemStart Start Windows -5850
;SND_ALIAS_SYSTEMWELCOME EQU 5753h ;SystemWelcome
; ;SystemNotification System Notification -5848
;
;Theme Sound Name Strings
;
;AppGPFault
;CCSelect
;Close
;CriticalBatteryAlarm
;DeviceConnect
;DeviceDisconnect
;DeviceFail
;LowBatteryAlarm
;MailBeep
;Maximize
;MenuCommand
;MenuPopup
;Minimize
;Open
;PrintComplete
;RestoreDown
;RestoreUp
;ShowBand
;SystemAsterisk
;SystemExclamation
;SystemExit
;SystemHand
;SystemNotification
;SystemQuestion
;SystemStart
;WindowsLogoff
;WindowsLogon
the aliasing definitions are stored in the registry under HKCU\AppEvents\EventLabels
be aware that the user may have selected no sound for that item :P
if you want to ensure that a sound is made, use a different method
if you notice, sound alias values like:
SND_ALIAS_SYSTEMEXCLAMATION EQU 2153h
are actually EQUate replacements of old 2-character strings
2153h is 'S!'
2A53h is 'S*'
3F53h is 'S?'
4453h is 'SD'
4553h is 'SE'
4853h is 'SH'
5353h is 'SS'
5753h is 'SW'