搜索把.关键字:系统栏 or 金山词 or tray or 时钟旁边 or 系统托盘

解决方案 »

  1.   

    我的源代码如下:const
      WM_REMIND_ICON_MESSAGE = WM_USER + 1;
      REMIND_TRAY_ICON = 1001;
    .
    .
    .  procedure IconAction(var Message: TMessage); message WM_REMIND_ICON_MESSAGE;
    .
    .
    .
    procedure TReminderForm.IconAction(var Message: TMessage);
    var
      pos: TPoint;
    begin
      if Message.LParam = WM_LBUTTONDOWN then
        ShowTipForm()
      else if Message.Lparam = WM_RBUTTONUP then
      begin
        GetCursorPos(pos);
        pmIcon.Popup(pos.x, pos.y);
      end;
    end;其中ShowTipForm()显示一个窗口,pmIcon为一个PopupMenu。
      

  2.   

    然后:这个函数显示ICON:procedure TReminderForm.ChangeIcon(Action: Integer);
    var
      nid: NOTIFYICONDATA;
    begin
      nid.Wnd := ReminderForm.Handle;
      nid.hIcon := ReminderForm.Icon.Handle;
      nid.uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP;
      nid.uID := REMIND_TRAY_ICON;
      nid.szTip := 'ATFA Reminder';
      nid.uCallbackMessage := WM_REMIND_ICON_MESSAGE;
      nid.cbSize := SizeOf(nid);  if Action = 1 then
        Shell_NotifyIcon(NIM_ADD, @nid)
      else
        Shell_NotifyIcon(NIM_DELETE, @nid);
    end;
      

  3.   

    IconAction函数捕捉ICON上的动作,如鼠标点击等等。而ChangeIcon改变状态栏的图表显示。如果还要具体,到Dephi的帮助中去查Shell_NotifyIcon吧。(Win 32 programmer guide)
      

  4.   

    忘了,还要uses Shellapi单元。
      

  5.   

    ksxy(空山新雨):
    不能運行呀...
    你能傳給我一個 簡單的源文件 嗎...
    謝謝你...
    email:  [email protected]
      

  6.   

    lichp(书生有驴情为径,绝海无鸭哭作粥!):
    可是我沒有trayIcon部件呀...
    你能幫我嗎....
      

  7.   

    一群......   在RxLib中就有﹐這個是最常用的, 我在自己的組件包中也做了一個