Unidad Umain;
interfaz
usos
Windows, mensajes, sysutils, clases, gráficos, controles, formularios, diálogos, Shellapi,
Menús, botones, extctrls;
estúpido
mousemsg = wm_user + 1;
iid = 100;
tipo
TForm1 = class (tForm)
Mainmenu1: tmainmenu;
Panel1: Tpanel;
SpeedButton1: TspeedButton;
SpeedButton6: TspeedButton;
SpeedButton7: TspeedButton;
SpeedButton8: TspeedButton;
SpeedButton9: TspeedButton;
SpeedButton10: TspeedButton;
PopUpmenu1: tpopupmenu;
Exit1: tmenuitem;
SpeedButton2: TspeedButton;
Procedimiento sqllmclick (remitente: tobject);
procedimiento n2Click (remitente: tobject);
procedimiento SpeedButton1Click (remitente: tobject);
procedimiento FormClose (remitente: tobject; VAR Acción: TCLoseAction);
procedimiento formulcreate (remitente: tobject);
procedimiento EXIT1Click (remitente: tobject);
privado
{Declaraciones privadas}
Procedimiento MouseMessage (Mensaje VAR: TMessage); mensaje
Mousemsg;
público
{Declaraciones públicas}
procedimiento ejecutor (remitente: tobject);
fin;
varilla
Form1: tform1;
ntida: tnotifyicondataa;
implementación
{$ R *.dfm}
procedimiento tForm1.MousEmessage (Mensaje var: TMessage);
varilla
Mustep: TPoint;
comenzar
heredado;
if mensaje.lparam = wm_rbuttonup entonces comience
getCursorpos (mouseP);
popupmenu1.popup (mousept.x, mousept.y);
fin;
if mensaje.lparam = wm_lButtonup entonces comience
Showwindow (mango, sw_show);
Showwindow (aplicación.handle, sw_show);
Setwindowlong (Application.Handle, GWL_EXSTYLE,
no (getwindowlong (Application.Handle, GWL_EXSTYLE)
o ws_ex_toolwindow y no ws_ex_appwindow));
fin;
Message.Result: = 0;
fin;
Procedimiento tForm1.FormClose (remitente: tobject; VAR Action: tCLoseAction);
comenzar
Acción: = canone;
Showwindow (mango, sw_hide);
Showwindow (aplicación.handle, sw_hide);
Setwindowlong (Application.Handle, GWL_EXSTYLE,
no (getwindowlong (Application.Handle, GWL_EXSTYLE)
o ws_ex_toolwindow y no ws_ex_appwindow));
fin;
procedimiento tForm1.FormCreate (remitente: tobject);
comenzar
ntida.cbsize: = sizeof (tnotifyicondataa);
ntida.wnd: = handle;
ntida.uid: = iid; ntida.uflags: = nif_icon + nif_tip +
niF_Message; ntida.ucallbackMessage: = mousemsg;
ntida.hicon: = application.icon.handle;
ntida.sztip: = 'icon';
shell_notifyicona (nim_add, @ntida);
fin;
procedimiento tForm1.exit1Click (remitente: tobject);
comenzar
ntida.cbsize: = sizeof (tnotifyicondataa);
ntida.wnd: = handle;
ntida.uid: = iid;
ntida.uflags: = nif_icon + nif_tip + nif_message;
ntida.ucallbackMessage: = mousemsg;
ntida.hicon: = application.icon.handle;
ntida.sztip: = 'icon';
shell_notifyicona (nim_delete, @ntida);
Aplicación.merminar;
fin;
fin.