To make sound 
Author Message
 To make sound

I have just started to learn Pascal at college and we are currently using
TPW 1.5 and I cannot make a program make any soound.

I know in TP7 it had something to do with

Begin
    Sound(200);
    delay(200);
    nosound;
end.

But this don't seem to work in TPW 1.5. The closeset I have come to making
sound is something called messagebeep.

Could you please help me


way I will be eternally great full.

Thanks in advance
   Chris



Wed, 18 Jun 1902 08:00:00 GMT  
 To make sound


Quote:
>I have just started to learn pascal at college and we are currently using
>TPW 1.5 and I cannot make a program make any sound.

Hi!
The Sound() procedure is defined in the CRT unit for real mode apps, not for
Windows. Some systems does not allow you access the speaker directly. You
should use the internal Windows procedures!

The solution is the MessageBeep() procedure.
Declaration: Procedure MessageBeep(BeepType: word);
BeepType specifies the sound file to play:

-1: Borland sasy this produces a standard beep sound by using the computer
    speaker, but you have to use 65535 (word type, not integer...)

MB_ICONASTERISK:   Plays the sound identified by the SystemAsterisk entry in
                   the [sounds] section of WIN.INI.
MB_ICONEXCLAMATION Plays the sound identified by the SystemExclamation
MB_ICONHAND        Plays the sound identified by the SystemHand
MB_ICONQUESTION    Plays the sound identified by the SystemQuestion
MB_OK              Plays the sound identified by the SystemDefault

These values are the same as the MessageBox() values. Sample:
MessageBeep(MB_ICONHAND);
MessageBox(0,'Fatal error. Quitting!','Error',MB_ICONHAND);

BandiT

=======================================================
Get PR-Tracker -- tracks problem reports, defects, bugs
INFORMATION:  http://www.prtracker.com/info.html
DOWNLOAD:     http://www.prtracker.com/download.html



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Probs with making sound

2. Sound through sound blaster!

3. Playing 16 bit stereo sound trought sound card

4. Playing 16 bit stereo sound trought sound card

5. 16-bit sound on Sound Blaster in Turbo Pascal

6. Self-made cursors over self-made buttons (The Real Mission Impossible!) ??

7. 2nd DataModul makes DB performance slow !?

8. Q: Making BDE thread-safe...How?

9. Making installation for IB6 - help

10. Detecting which session is making posts ....

11. Making changes in a Table... Interbase

12. Making Database Multi-User

 

 
Powered by phpBB® Forum Software