unit Sound;
CODE
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, MMSYSTEM,
Buttons, StdCtrls, EditBtn;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
DirectoryEdit1: TDirectoryEdit;
Edit1: TEdit;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
procedure DirectoryEdit1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
song: string;
implementation
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
song:=Edit1.Caption;
if(Edit1.Caption='Nasko')then begin PlaySound('song', 0, 0);end;
end;
procedure TForm1.DirectoryEdit1Click(Sender: TObject);
begin
end;
initialization
{$I Sound.lrs}
end.
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, MMSYSTEM,
Buttons, StdCtrls, EditBtn;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
DirectoryEdit1: TDirectoryEdit;
Edit1: TEdit;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
procedure DirectoryEdit1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
song: string;
implementation
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
song:=Edit1.Caption;
if(Edit1.Caption='Nasko')then begin PlaySound('song', 0, 0);end;
end;
procedure TForm1.DirectoryEdit1Click(Sender: TObject);
begin
end;
initialization
{$I Sound.lrs}
end.
Компилатор - Lazaurs.