unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
AppEvent, RXShell;
type
TForm1 = class(TForm)
RxTrayIcon1: TRxTrayIcon;
AppEvents1: TAppEvents;
procedure AppEvents1Minimize(Sender: TObject);
procedure RxTrayIcon1DblClick(Sender: TObject);
procedure RxTrayIcon1Click(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.AppEvents1Minimize(Sender: TObject);
begin
if NewStyleControls then ShowWindow(Application.Handle, SW_HIDE);
end;
procedure TForm1.RxTrayIcon1DblClick(Sender: TObject);
begin
ShowWindow(Application.Handle, SW_RESTORE);
end;
procedure TForm1.RxTrayIcon1Click(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button=mbRight then Close;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
SetWindowLong(Application.Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW);
end;
end.