Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.08.25;
Скачать: CL | DM;

Вниз

system tray   Найти похожие ветки 

 
sewix ©   (2003-08-08 15:51) [0]

Как сделать, что бы программа посилилась system tray"е. Я использую RxTrayIcon. При разворачивании программы она должна оставаться в tray"е и не появляться в Taskbar.


 
Е-Моё имя ©   (2003-08-08 18:26) [1]

ShowMainForm:=false ?


 
sewix ©   (2003-08-10 08:37) [2]

Показывать главную форму когда приложение развернуто. Как в Winamp"е если в настройках указать "System tray only"


 
Proger_XP ©   (2003-08-10 10:20) [3]

Можно и без RxTrayIcon
Попробуй вот это:


unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ShellApi, Menus, ExtCtrls, Spin;

type
TForm1 = class(TForm)
Button1: TButton;
pm: TPopupMenu;
I11: TMenuItem;
I21: TMenuItem;
procedure Button1Click(Sender: TObject);
procedure TrayMsg(var Msg: TMessage);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.TrayMsg;
var
Pt: TPoint;
begin
if Msg.Msg = WM_USER + 1024 then
case Msg.lParam of
WM_LBUTTONDOWN:
begin
GetCursorPos(Pt);
pm.Popup(Pt.X, pt.Y)
end;
WM_RBUTTONDOWN:
ShowMessage("Msg is hooked");
WM_MBUTTONDOWN:
ShowMessage("Msg MBD is hooked");
WM_LBUTTONDBLCLK:
Show
end
end;

procedure TForm1.Button1Click(Sender: TObject);
var
Tray: TNotifyIconData;
begin
with Tray do
begin
cbSize := SizeOf(TNotifyIconData);
Wnd := AllocateHWnd(Form1.TrayMsg);
uID := 1;
uFlags := NIF_MESSAGE;
( NIM_ADD, Addr(Tray)
Можно и без RxTrayIcon
Попробуй вот это:


unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ShellApi, Menus, ExtCtrls, Spin;

type
TForm1 = class(TForm)
Button1: TButton;
pm: TPopupMenu;
I11: TMenuItem;
I21: TMenuItem;
procedure Button1Click(Sender: TObject);
procedure TrayMsg(var Msg: TMessage);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.TrayMsg;
var
Pt: TPoint;
begin
if Msg.Msg = WM_USER + 1024 then
case Msg.lParam of
WM_LBUTTONDOWN:
begin
GetCursorPos(Pt);
pm.Popup(Pt.X, pt.Y)
end;
WM_RBUTTONDOWN:
ShowMessage("Msg is hooked");
WM_MBUTTONDOWN:
ShowMessage("Msg MBD is hooked");
WM_LBUTTONDBLCLK:
Show
end
end;

procedure TForm1.Button1Click(Sender: TObject);
var
Tray: TNotifyIconData;
begin
with Tray do
begin
cbSize := SizeOf(TNotifyIconData);
Wnd := AllocateHWnd(Form1.TrayMsg);
uID := 1;
uFlags := NIF_MESSAGE;
uCallBackMessage := WM_USER + 1024
end;
Shell_NotifyIcon(NIM_ADD, Addr(Tray));
Hide
end;

end.


 
REP ©   (2003-08-11 08:20) [4]

А чтобы не появлялась в TaskBar"е Можно делать так:

procedure TForm1.FormPaint(Sender: TObject);
begin
ShowWindow(Application.Handle,SW_HIDE);
end;



Страницы: 1 вся ветка

Текущий архив: 2003.08.25;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.024 c
1-81678
ki11er
2003-08-11 16:26
2003.08.25
Можно ли подключить исходник rtl к проекту?


3-81563
Alexxxxx
2003-07-28 20:40
2003.08.25
С чего начать изучение трехзвенки


1-81723
Shuric
2003-08-08 21:03
2003.08.25
Графика


3-81570
NiBL'S
2003-07-29 14:43
2003.08.25
Invalid variant type conversion.


14-81944
HolACost (*nickname*)
2003-08-06 18:48
2003.08.25
Про регистрацию левых логинов