Вниз
Скачать: CL | DM;

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

 
Laymer   (2004-02-27 13:47) [0]

Не подскажите как убрать прогу из TaskBar и поместить ее туда где часы.


 
VMcL ©   (2004-02-27 14:41) [1]

FAQ
___
LMD


 
DeadMeat ©   (2004-02-27 15:07) [2]

Этт тебе к АП надо... Он этот вопрос любит...


 
GLFox   (2004-02-27 15:14) [3]

Вот кусок рабочей проги

program WinObsrv;

uses
 Windows,
 Messages,
 ShellAPI,
 MainWnd in "MainWnd.pas",

{$R *.res}

function TrayIconAdd(hWindow:HWND; IconID:Integer; sTip:String):Boolean;
var
 hTrayIcon : HICON;
 NID:NOTIFYICONDATA;
 i,iMaxLen:Integer;
begin
 NID.cbSize := sizeof(NOTIFYICONDATA);
 NID.Wnd := hWindow;
 NID.uID := IconID;
 NID.uFlags := NIF_MESSAGE or NIF_ICON or NIF_TIP;
 NID.uCallbackMessage := WM_TrayIcon;
 hTrayIcon:=LoadIcon(hInstance,"MAINICON");
 NID.hIcon:=hTrayIcon;
 if Length(sTip)>0 then begin
   if Length(sTip)>(Length(NID.szTip)-1) then iMaxLen:=Length(NID.szTip)-1
   else iMaxLen:=Length(sTip);
   for i:=1 to iMaxLen do NID.szTip[i-1]:=sTip[i];
   NID.szTip[iMaxLen]:=#0;
 end else NID.szTip[0]:=#0;
 Result:=Shell_NotifyIcon(NIM_ADD,@NID);
 if (hTrayIcon<>0) then DestroyIcon(hTrayIcon);
end;

function TrayIconDel(hWindow:HWND; IconID:Integer):Boolean;
var NID:NOTIFYICONDATA;
begin
 NID.cbSize:=sizeof(NOTIFYICONDATA);
 NID.Wnd:= hWindow;
 NID.uID:= IconID;
 Result:=Shell_NotifyIcon(NIM_DELETE,@NID);
end;

var
 Msg:TMsg;
 WndMain:TMainWnd;
begin
 WndMain:=TMainWnd.Create(hInstance,"");
 TrayIconAdd(WndMain.Handle,IconIDMain,AppTitle+" "+AppVersion);
 repeat
   GetMessage(Msg,0{WndMain.Handle},0,0);
   if Msg.message=WM_QUIT then Break;
   TranslateMessage(Msg);
   DispatchMessage(Msg);
 until False;
 TrayIconDel(WndMain.Handle,IconIDMain);
 WndMain.Free;
end.



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

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.027 c
14-1080732293
Knight
2004-03-31 15:24
2004.04.25
Поделитесь способами отлова неизвестных вирусов...


1-1081378880
Romula
2004-04-08 03:01
2004.04.25
TPageControl


3-1080567824
alex123
2004-03-29 17:43
2004.04.25
ClientDataSet : Запись изменена другим пользователем


11-1064815249
bfg1000ke
2003-09-29 10:00
2004.04.25
Реестр


3-1080285238
Mamed
2004-03-26 10:13
2004.04.25
AdoConnection




   Наверх