Page 1 of 1
A beep sound

Posted:
June 29th, 2007, 9:42 pm
by MrNotToSmartGuy
Is there a way to program a Beep?

Posted:
June 29th, 2007, 9:46 pm
by Codius
Yep!
Beep; - Found in SysUtils

Posted:
June 29th, 2007, 11:38 pm
by MrNotToSmartGuy
yeah ... how to do access that sysutls

Posted:
June 30th, 2007, 12:24 am
by MrNotToSmartGuy
i type beep; nothing happens

Posted:
June 30th, 2007, 12:34 am
by Kambiz
Try
MessageBeep API of Windows.
- Code: Select all
function MessageBeep(uType: Cardinal): Boolean;
where uType is:
- $FFFFFFFF
Standard beep using the computer speaker - MB_ICONASTERISK
System Asterisk - MB_ICONEXCLAMATION
System Exclamation - MB_ICONHAND
System Hand - MB_ICONQUESTION
System Question - MB_OK
System Default

Posted:
June 30th, 2007, 1:49 am
by MrNotToSmartGuy
thank you for the reply. when I type the function MessageBeep delphi doesn't understand what MessageBeep is, do I have to include something in the uses part?

Posted:
June 30th, 2007, 1:08 pm
by Kambiz
Yes! windows should be in uses clause.

Posted:
July 1st, 2007, 2:14 am
by MrNotToSmartGuy
continue := MessageBeep($FFFFFFFF );
This is what I have an I'm not getting it to beep. Continue is a boolean

Posted:
July 1st, 2007, 4:38 am
by MrNotToSmartGuy
it is a consol applicatoin if that matters

Posted:
July 1st, 2007, 3:31 pm
by Kambiz
MrNotToSmartGuy wrote:it is a consol applicatoin if that matters
Of course, it does matter.
Try this one, it should work:
- Code: Select all
procedure Beep;
begin
Write(#8);
end;