用控件可以,也可以自己实现。
用函数:
Shell_NotifyIcon(NIM_ADD,tnd);
看一下Windows API。

解决方案 »

  1.   

    RX组件包中有RxTrayIcon,我有,想要我给你发过来,共1,176KB
      

  2.   

    给你一段代码吧。
    需要包含:use shellapiWM_USER_NOTIFYICON=WM_USER+500;
    ///自定义消息。procedure OnMyNotifyIcon(var Msg:TMessage);message WM_USER_NOTIFYICON;
    //图标点击回调函数。procedure TForm1.Button1Click(Sender: TObject);
    var
        tnd:pNOTIFYICONDATA;
    begin
        new(tnd);
        tnd.cbSize:=sizeof(NOTIFYICONDATA);
        tnd.Wnd := Handle;
        tnd.uID := 0;
        tnd.uFlags:=(NIF_MESSAGE) or (NIF_ICON or NIF_TIP);
        tnd.uCallbackMessage := WM_USER_NOTIFYICON;
        tnd.hIcon := LoadIcon(HInstance,'MAINICON');
        Shell_NotifyIcon(NIM_ADD,tnd);
        FreeMem(tnd);
    end;
    //---------------------------------------------------------------------------
    procedure TForm1.OnMyNotifyIcon(var Msg:TMessage);
    var
        Pos:TPoint;
    begin
        case Msg.LParam of
             WM_RBUTTONDOWN:
             begin
                SetForegroundWindow(Handle);
            GetCursorPos(Pos);
                PopupMenu1.Popup(pos.x,Pos.y);
             end;
        end;
    end;
      

  3.   

    poleax()给我发一份好吗?谢谢  [email protected]
      

  4.   

    bcb5里的example里直接就有trayicon的控件可以使用(delphi里没有)
    在其example\control\下就有该控件的源程序
    研究研究,自己就知道该怎么做了