home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / PM-M2.ZIP / SOUND.MOD < prev    next >
Text File  |  1990-08-05  |  3KB  |  60 lines

  1. (*----------------------------------------------------------------------------*)
  2. (* Example OS/2 Presentation Manager Program adapted from the book            *)
  3. (* "OS/2 Presentation Manager - Programming Primer" by Asael Dror &           *)
  4. (* Robert Lafore                                                              *)
  5. (*                                                                            *)
  6. (* Example programs converted to JPI Modula-2 Version 2 for OS/2 1.2 by       *)
  7. (* Chris Barker, August 1990                                                  *)
  8. (*                                                                            *)
  9. (* Notes:  I am distributing these programs so that others can learn and also *)
  10. (*         so I can elicit feedback from the user community on programming for*)
  11. (*         OS/2 PM using Modula-2.  If your have any questions, suggestions,  *)
  12. (*         or comments I'd love to hear from you.  I may be reached at the    *)
  13. (*         following addresses:                                               *)
  14. (*                                                                            *)
  15. (*         Compuserve ID: 72261,2312                                          *)
  16. (*         Pete Norloff's OS/2 Shareware BBS - (703) 385-4325                 *)
  17. (*         Max's Doghouse BBS - (703) 548-7849                                *)
  18. (*           The above two BBS carry the Fidonet OS/2 echo which I read       *)
  19. (*           regularly.                                                       *)
  20. (*         Programmer's Corner - (301) 596-1180                               *)
  21. (*         CPCUG Mix (Window Sig) BBS - (301) 738-9060                        *)
  22. (*                                                                            *)
  23. (*         I hope I hear from you!                                            *)
  24. (*                                                                            *)
  25. (*               - Chris                                                      *)
  26. (*                                                                            *)
  27. (*----------------------------------------------------------------------------*)
  28.  
  29. (*----------------------------------------------------------------------------*)
  30. (*  Program Notes:                                                            *)
  31. (*    My very first PM program! All this program does is beep once and exits. *)
  32. (*    Source code on page 25.                                                 *)
  33. (*                                                                            *)
  34. (*                                                                            *)
  35. (*----------------------------------------------------------------------------*)
  36. MODULE SOUND;
  37.  
  38. (*# call(same_ds => off) *)
  39.  
  40. IMPORT OS2DEF,Win,Gpi,Dos,Lib,SYSTEM;
  41. FROM OS2DEF IMPORT HAB,NULL;
  42.  
  43. VAR
  44.   Hab       : HAB;
  45.  
  46. PROCEDURE Error;
  47. BEGIN
  48. END Error;
  49.  
  50. BEGIN
  51.   Hab := Win.Initialize(NULL);
  52.   IF NOT Win.Alarm(Win.HWND_DESKTOP, Win.WA_NOTE) THEN
  53.      Error;
  54.   END;
  55.   IF NOT Win.Terminate(Hab) THEN
  56.      Error;
  57.   END;
  58. END SOUND.
  59.  
  60.