The Hawkeye Mihawk

The King Swordman’s Legend Of Shichibukai

Membuat Alaram dengan Delphi

Posted by juraquillemihawk on March 27, 2008

unit jam;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, Menus;

type
TForm1 = class(TForm)
Timer1: TTimer;
PopupMenu1: TPopupMenu;
SetAlarm1: TMenuItem;
Alarmoff1: TMenuItem;
Exit1: TMenuItem;
Label1: TLabel;
Informasi1: TMenuItem;
procedure ontimer(Sender: TObject);
procedure SetAlarm1Click(Sender: TObject);
procedure Alarmoff1Click(Sender: TObject);
procedure Exit1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Informasi1Click(Sender: TObject);

private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
alarm:Tdatetime;
implementation

{$R *.DFM}
uses mmsystem;
procedure TForm1.ontimer(Sender: TObject);
begin
label1.caption:=timetostr(time);
if (time)>=(Alarm) then playsound(‘c:\windows\media\chimes.wav’,0,snd_sync);
end;

procedure TForm1.SetAlarm1Click(Sender: TObject);
begin
Alarm := strtotime(inputbox(‘input’,
‘Masukan Alarm-nya’,’ ‘));
end;

procedure TForm1.Alarmoff1Click(Sender: TObject);
begin
alarm:=time+1
end;

procedure TForm1.Exit1Click(Sender: TObject);
begin
close;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Alarmoff1Click(sender);
end;

procedure TForm1.Informasi1Click(Sender: TObject);
begin
showmessage(‘Oleh Aris 2001’);
end;

end.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: