1 2 unit Unit1; 3 4 interface 5 6 uses 7 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 8 Dialogs, StdCtrls,MMSystem; 9 10 type 11 TForm1 = class(TForm) 12 Button1: TButton; 13 procedure Button1Click(Sender: TObject); 14 private 15 { Private declarations } 16 public 17 { Public declarations } 18 end; 19 20 var 21 Form1: TForm1; 22 23 implementation 24 25 {$R *.dfm} 26 27 procedure TForm1.Button1Click(Sender: TObject); 28 begin 29 PlaySound(PChar('SYSTEMSTART'), 0, SND_ASYNC); 30 { 31 Other System sounds: 32 33 SYSTEMSTART 34 SYSTEMEXIT 35 SYSTEMHAND 36 SYSTEMASTERISK 37 SYSTEMQUESTION 38 SYSTEMEXCLAMATION 39 SYSTEMWELCOME 40 SYSTEMDEFAULT 41 } 42 end; 43 44 end. 45