基本信息
源码名称:Delphi 托盘实例
源码大小:0.16M
文件格式:.rar
开发语言:Pascal
更新时间:2021-12-20
   源码介绍
Delphi 托盘实例

begin
  inherited;
  if Msg.LParam = WM_LBUTTONDBLCLK then
  begin //双击图片图标还原窗体
    ShowWindow(Application.Handle, SW_SHOW);
    ShowWindow(Application.Handle, SW_SHOWNORMAL);
    Application.BringToFront;
    Shell_NotifyIcon(NIM_Delete, @MINIFTPFF);
  end
  else if Msg.LParam = WM_RBUTTONUP then
  begin
    SetForegroundWindow(Handle);
    GetCursorPos(mouse);//获得鼠标坐标
    PopupMenu1.Popup(mouse.X, mouse.Y);//在鼠标光标处显示弹出菜单
  end;
// if (Msg.Msg = WM_NCACTIVATE) then
//  PopupForm.Destroy;
// 响应任务栏托盘重建消息
  if Msg.Msg = MsgTaskbarRestart then
    MiniToTaskbar; // 最小化到托盘