interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
Edit1: TEdit;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
saat,dakika,saniye,milisaniye:word;
s,s1,s2,d1,d2:string;
implementation
{$R *.DFM}
procedure TForm1.Timer1Timer(Sender: TObject);
begin
DecodeTime(Time,saat,dakika,saniye,milisaniye);
if s1=inttostr(saat) then
if s2=inttostr(dakika) then
begin
exitwindowsex(EWX_SHUTDOWN,0);
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
edit1.Text:=timetostr(Time);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
s:=edit1.text;
s1:=Copy(s,1,2);
s2:=copy(s,4,2);
Timer1.Enabled:=true;
Application.Minimize;
end;
end.
İşinize yarar diye düşündüm..