Einheit Umain;
Schnittstelle
Verwendung
Windows, Nachrichten, Systeme, Klassen, Grafiken, Steuerelemente, Formulare, Dialoge, Schaloge,
Menüs, Knöpfe, extctrls;
Const
Mousemsg = wm_user + 1;
iid = 100;
Typ
Tform1 = Klasse (tform)
Mainmenu1: Tmainmenu;
Panel1: tpanel;
SpeedButton1: TspeedButton;
SpeedButton6: TspeedButton;
SpeedButton7: TspeedButton;
SpeedButton8: TspeedButton;
SpeedButton9: TspeedButton;
SpeedButton10: TspeedButton;
PopupMenu1: tpopupMenu;
Exit1: tMenuitem;
SpeedButton2: TspeedButton;
Procedure sqllmclick (Absender: tobject);
Prozedur N2Click (Absender: Tobject);
Prozedur SpeedButton1Click (Absender: Tobject);
ProzedurformClose (Absender: Tobject; var Aktion: tcloseaction);
Prozedur Formcreate (Absender: Tobject);
Procedure exit1click (Absender: Tobject);
Privat
{Private Deklarationen}
Prozedur Mousemessage (var message: tmessage); Nachricht
Mousemsg;
öffentlich
{Öffentliche Erklärungen}
Procedure Exec (Absender: Tobject);
Ende;
var
Form1: tform1;
ntida: tnotifyicondataa;
Durchführung
{$ R *.dfm}
procedure tform1.mousemessage (var message: tmessage);
var
MOUSEPT: tPoint;
beginnen
geerbt;
Wenn message.lparam = wm_rbuttonup dann beginnen
getCursorpos (Moorept);
popupMenu1.popup (Mousept.x, Moorept.Y);
Ende;
Wenn message.lparam = wm_lbuttonup dann beginnen
ShowWindow (Handle, SW_Show);
ShowWindow (application.Handle, sw_show);
Setwindowlong (application.handle, gwl_exStyle,
Nicht (Getwindowlong (application.Handle, gwl_exStyle)
oder ws_ex_toolwindow und nicht ws_ex_appwindow));
Ende;
Message.Result: = 0;
Ende;
Procedure tform1.formclose (Absender: tobject; var action: tcloseaction);
beginnen
Aktion: = Kanone;
ShowWindow (Handle, SW_Hide);
ShowWindow (application.Handle, sw_hide);
Setwindowlong (application.handle, gwl_exStyle,
Nicht (Getwindowlong (application.Handle, gwl_exStyle)
oder ws_ex_toolwindow und nicht ws_ex_appwindow));
Ende;
procedure tform1.formcreate (Absender: tobject);
beginnen
ntida.cbsize: = sizeof (tnotifyicondataa);
ntida.wnd: = Handle;
ntida.uid: = iid; ntida.ufags: = nif_icon + nif_tip +
nif_message; ntida.ucallbackMessage: = Mousemsg;
ntida.hicon: = application.icon.handle;
ntida.sztip: = 'icon';
Shell_notifyicona (nim_add, @ntida);
Ende;
procedure tform1.exit1click (Absender: tobject);
beginnen
ntida.cbsize: = sizeof (tnotifyicondataa);
ntida.wnd: = Handle;
ntida.uid: = iid;
ntida.ufags: = nif_icon + nif_tip + nif_message;
ntida.ucallbackMessage: = Mousemsg;
ntida.hicon: = application.icon.handle;
ntida.sztip: = 'icon';
Shell_notifyicona (nim_delete, @ntida);
Application.terate;
Ende;
Ende.