I have the code below:
IF MessageDlg('Delete?',mtConfirmation,[mbYes,mbNo],0) = MrYes THEN Begin
When Style is Windows , the MessageDlg function plays sound, but if I replace Style with Windows 10 , for example, the sound does not work.
Note. I am working on a Delphi 10 Seattle .
Update:
I am trying to use MessageBeep(MB_ICONQUESTION); like David Heffernan in his answer, but that also does not emit a sound.
source share