unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Shellapi, ExtCtrls, CoolTrayIcon, TextTrayIcon, Menus, Registry;
type
TForm1 =
class(TForm)
Edit1: TEdit;
Button1: TButton;
Edit2: TEdit;
Button2: TButton;
Timer1: TTimer;
Label1: TLabel;
CoolTrayIcon1: TCoolTrayIcon;
PopupMenu1: TPopupMenu;
Open1: TMenuItem;
Exit1: TMenuItem;
Button3: TButton;
Edit3: TEdit;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Open1Click(Sender: TObject);
procedure Exit1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
TMP:
Array[0..255]
of char;
TMP1:
Array[0..255]
of char;
begin
StrPCopy(TMP, Edit1.Text);
StrPCopy(TMP1, Edit3.Text);
end;
procedure TForm1.Button2Click(Sender: TObject);
var
termin: integer;
TMP:
Array[0..255]
of char;
TMP1:
Array[0..255]
of char;
begin
termin:=strtoint(edit2.text);
Timer1.Interval :=termin;
Timer1.Enabled := True;
StrPCopy(TMP, Edit1.Text);
StrPCopy(TMP1, Edit3.Text);
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
termin: integer;
TMP:
Array[0..255]
of char;
TMP1:
Array[0..255]
of char;
begin
termin:=strtoint(edit2.text);
termin:=termin*60*1000;
Timer1.Interval :=termin;
Timer1.Enabled := True;
StrPCopy(TMP, Edit1.Text);
StrPCopy(TMP1, Edit3.Text);
ShellExecute(0,
NIL,TMP,
NIL,
NIL,SW_Normal);
ShellExecute(0,'
open',TMP1,
NIL,
NIL,SW_Normal);
end;
procedure TForm1.Open1Click(Sender: TObject);
begin
CoolTrayIcon1.ShowMainForm;
end;
procedure TForm1.Exit1Click(Sender: TObject);
begin
halt;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Form1.Hide
end;
end.