Delphi Basics
Beep
Procedure
Make a beep sound SysUtils unit
 procedure Beep ;
Description
The Beep procedure creates a very short and quiet sound through the internal speaker of your PC. It is used as an indication that the user has done something wrong.
 
Example code : Very simple!
// Full Unit code.
// -----------------------------------------------------------
// You must store this code in a unit called Unit1 with a form
// called Form1 that has an OnCreate event called FormCreate.
 
unit Unit1;
 
interface
 
uses
  SysUtils,   // Unit containing the Beep command
  Forms, Dialogs;
 
type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  end;
 
var
  
Form1: TForm1;
 
implementation
{$R *.dfm} // Include form definitions
 
procedure TForm1.FormCreate(Sender: TObject);

begin
  Beep;
end;
 
end.
Hide full unit code
   
 
© CodeGear 2006 - 2007. All rights reserved.  |  Home Page