Sta treba promijenit tako da uz pomoc main menu otvorim .wav datoteku??
Code:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls, MMSystem;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
OpenDialog1: TOpenDialog;
File1: TMenuItem;
Open1: TMenuItem;
Exit1: TMenuItem;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure Open1Click(Sender: TObject);
procedure Exit1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Exit1Click(Sender: TObject);
begin
close;
end;
procedure TForm1.Open1Click(Sender: TObject);
begin
with self.OpenDialog1 do
if execute then
self.Caption:=filename;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if not PlaySound('lokacija do fajla',0,SND_FILENAME) //tu mi nesto smrdi :)
then showmessage('Problem je nastao!!');
end;
end.