亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cooltrayicon.pas

?? 時(shí)監(jiān)測郵箱中郵件信息
?? PAS
?? 第 1 頁 / 共 2 頁
字號(hào):
        end;

      WM_RBUTTONDOWN:
        if FEnabled then
        begin
          Shift := ShiftState + [ssRight];
          GetCursorPos(Pt);
          MouseDown(mbRight, Shift, Pt.X, Pt.Y);
          PopupAtCursor;
        end;

      WM_MBUTTONDOWN:
        if FEnabled then
        begin
          Shift := ShiftState + [ssMiddle];
          GetCursorPos(Pt);
          MouseDown(mbMiddle, Shift, Pt.X, Pt.Y);
        end;

      WM_LBUTTONUP:
        if FEnabled then
        begin
          Shift := ShiftState + [ssLeft];
          GetCursorPos(Pt);
          if FClickStart then       // Then WM_LBUTTONDOWN was called before
          begin
            FClickStart := False;
            Click;                  // We have a click
          end;
          MouseUp(mbLeft, Shift, Pt.X, Pt.Y);
        end;

      WM_RBUTTONUP:
        if FEnabled then
        begin
          Shift := ShiftState + [ssRight];
          GetCursorPos(Pt);
          MouseUp(mbRight, Shift, Pt.X, Pt.Y);
        end;

      WM_MBUTTONUP:
        if FEnabled then
        begin
          Shift := ShiftState + [ssMiddle];
          GetCursorPos(Pt);
          MouseUp(mbMiddle, Shift, Pt.X, Pt.Y);
        end;

      WM_LBUTTONDBLCLK:
        if FEnabled then
        begin
          DblClick;
          { Handle default menu items. But only if LeftPopup is false,
            or it will conflict with the popupmenu, when it is called
            by a click event. }
          M := nil;
          if Assigned(FPopupMenu) then
            if (FPopupMenu.AutoPopup) and (not FLeftPopup) then
              for I := PopupMenu.Items.Count -1 downto 0 do
              begin
                if PopupMenu.Items[I].Default then
                  M := PopupMenu.Items[I];
              end;
          if M <> nil then
            M.Click;
        end;
      end;
  end

  else        // Messages that didn't go through the icon
    case Msg.Msg of
      { Windows sends us a WM_QUERYENDSESSION message when it prepares
        for shutdown. Msg.Result must not return 0, or the system will
        be unable to shut down. }
      WM_QUERYENDSESSION: begin
//showmessage('WM_QUERYENDSESSION');
//        PostQuitMessage(0);
        Msg.Result := 1;
      end;
{
      WM_DESTROY: begin
showmessage('WM_DESTROY');
        PostQuitMessage(0);
        Msg.Result := 0;
      end;
}
{
      WM_ENDSESSION: begin
//showmessage('WM_ENDSESSION');
        Msg.Result := 0;
      end;
}
    else      // Handle all other messages with the default handler
      Msg.Result := DefWindowProc(IconData.Wnd, Msg.Msg, Msg.wParam, Msg.lParam);
    end;
end;


procedure TCoolTrayIcon.SetIcon(Value: TIcon);
begin
  FIcon.Assign(Value);
  ModifyIcon;
end;


procedure TCoolTrayIcon.SetIconVisible(Value: Boolean);
begin
  if Value then
    ShowIcon
  else
    HideIcon;
end;


procedure TCoolTrayIcon.SetDesignPreview(Value: Boolean);
begin
  FDesignPreview := Value;
  SettingPreview := True;         // Raise flag
  SetIconVisible(Value);
  SettingPreview := False;        // Clear flag
end;


procedure TCoolTrayIcon.SetCycleIcons(Value: Boolean);
begin
  FCycleIcons := Value;
  if Value then
    SetIconIndex(0);
  CycleTimer.Enabled := Value;
end;


procedure TCoolTrayIcon.SetCycleInterval(Value: Cardinal);
begin
  FCycleInterval := Value;
  CycleTimer.Interval := FCycleInterval;
end;


procedure TCoolTrayIcon.SetIconList(Value: TImageList);
begin
  FIconList := Value;
{
  // Set CycleIcons = false if IconList is nil
  if Value = nil then
    SetCycleIcons(False);
}
  SetIconIndex(0);
end;


procedure TCoolTrayIcon.SetIconIndex(Value: Integer);
begin
  if FIconList <> nil then
  begin
    FIconIndex := Value;
    if Value >= FIconList.Count then
      FIconIndex := FIconList.Count -1;
    FIconList.GetIcon(FIconIndex, FIcon);
  end
  else
    FIconIndex := 0;

  ModifyIcon;
end;


procedure TCoolTrayIcon.SetHint(Value: String);
begin
  FHint := Value;
  ModifyIcon;
end;


procedure TCoolTrayIcon.SetShowHint(Value: Boolean);
begin
  FShowHint := Value;
  ModifyIcon;
end;


function TCoolTrayIcon.InitIcon: Boolean;
// Set icon and tooltip
var
  ok: Boolean;
begin
  Result := False;
  ok := True;
  if (csDesigning in ComponentState) {or
     (csLoading in ComponentState)} then
  begin
    if SettingPreview then
      ok := True
    else
      ok := FDesignPreview
  end;

  if ok then
  begin
    IconData.hIcon := FIcon.Handle;
    if (FHint <> '') and (FShowHint) then
      StrLCopy(IconData.szTip, PChar(FHint), SizeOf(IconData.szTip)-1)
      // StrLCopy must be used since szTip is only 64 bytes
    else
      IconData.szTip := '';
    Result := True;
  end;
end;


function TCoolTrayIcon.ShowIcon: Boolean;
// Add/show the icon on the tray
begin
  Result := False;
  if not SettingPreview then
    FIconVisible := True;
  begin
    if (csDesigning in ComponentState) {or
     (csLoading in ComponentState)} then
    begin
      if SettingPreview then
        if InitIcon then
          Result := Shell_NotifyIcon(NIM_ADD, @IconData);
    end
    else
    if InitIcon then
      Result := Shell_NotifyIcon(NIM_ADD, @IconData);
  end;
end;


function TCoolTrayIcon.HideIcon: Boolean;
// Remove/hide the icon from the tray
begin
  Result := False;
  if not SettingPreview then
    FIconVisible := False;
  begin
    if (csDesigning in ComponentState) {or
     (csLoading in ComponentState)} then
    begin
      if SettingPreview then
        if InitIcon then
          Result := Shell_NotifyIcon(NIM_DELETE, @IconData);
    end
    else
    if InitIcon then
      Result := Shell_NotifyIcon(NIM_DELETE, @IconData);
  end;
end;


function TCoolTrayIcon.ModifyIcon: Boolean;
// Change icon or tooltip if icon already placed
begin
  Result := False;
  if InitIcon then
    Result := Shell_NotifyIcon(NIM_MODIFY, @IconData);
end;


procedure TCoolTrayIcon.TimerCycle(Sender: TObject);
begin
  if Assigned(FIconList) then
  begin
    FIconList.GetIcon(FIconIndex, FIcon);
    CycleIcon;                    // Call event method
    ModifyIcon;

    if FIconIndex < FIconList.Count-1 then
      SetIconIndex(FIconIndex+1)
    else
      SetIconIndex(0);
  end;
end;


procedure TCoolTrayIcon.ShowMainForm;
begin
  if Application.MainForm <> nil then
  begin
    // Show application's TASKBAR icon (not the traybar icon)
    ShowWindow(Application.Handle, SW_RESTORE);
//    ShowWindow(Application.Handle, SW_SHOWNORMAL);
//    Application.Restore;
    // Show the form itself
    Application.MainForm.Visible := True;
//    ShowWindow((Owner as TWinControl).Handle, SW_RESTORE);
  end;
end;


procedure TCoolTrayIcon.HideMainForm;
begin
  if Application.MainForm <> nil then
  begin
    // Hide the form itself (and thus any child windows)
    Application.MainForm.Visible := False;
    { Hide application's TASKBAR icon (not the traybar icon).
      Do this AFTER the mainform is hidden, or any child windows
      will redisplay the taskbar icon if they are visible. }
    ShowWindow(Application.Handle, SW_HIDE);
  end;
end;


function TCoolTrayIcon.ShowBalloonHint(Title: String; Text: String;
  IconType: TBalloonHintIcon; TimeoutSecs: TBalloonHintTimeOut): Boolean;
// Show balloon hint. Return false if error.
const
  aBalloonIconTypes: array[TBalloonHintIcon] of Byte =
    (NIIF_NONE, NIIF_INFO, NIIF_WARNING, NIIF_ERROR);
begin
  if FEnabled then
  begin
    // Remove old balloon hint
    with IconData do
    begin
      uFlags := uFlags or NIF_INFO;
      StrPCopy(szInfo, '');
    end;
    ModifyIcon;
    // Display new balloon hint
    with IconData do
    begin
      uFlags := uFlags or NIF_INFO;
      StrPCopy(szInfo, Text);
      StrPCopy(szInfoTitle, Title);
      uTimeout := TimeoutSecs * 1000;
      dwInfoFlags := aBalloonIconTypes[IconType];
    end;
    Result := ModifyIcon;
    { Remove NIF_INFO before next call to ModifyIcon (or else the balloon hint
      will redisplay itself) }
    with IconData do
      uFlags := NIF_ICON + NIF_MESSAGE + NIF_TIP;
  end
  else
    Result := True;
end;


function TCoolTrayIcon.BitmapToIcon(const Bitmap: TBitmap;
  const Icon: TIcon; MaskColor: TColor): Boolean;
{ Render an icon from a 16x16 bitmap. Return false if error.
  MaskColor is a color that will be rendered transparently. Use clNone for
  no transparency. }
var
  BitmapImageList: TImageList;
begin
  BitmapImageList := TImageList.CreateSize(16, 16);
  try
    Result := False;
    BitmapImageList.AddMasked(Bitmap, MaskColor);
    BitmapImageList.GetIcon(0, Icon);
    Result := True;
  finally
    BitmapImageList.Free;
  end;
end;


function TCoolTrayIcon.Refresh: Boolean;
// Refresh the icon
begin
  Result := ModifyIcon;
end;


procedure TCoolTrayIcon.PopupAtCursor;
var
  CursorPos: TPoint;
begin
  if Assigned(PopupMenu) then
    if PopupMenu.AutoPopup then
      if GetCursorPos(CursorPos) then
      begin
        { Win98 (but not Win95/WinNT) seems to empty a popup menu before
          closing it. This is a problem when the menu is about to display
          while it already is active (two click-events in succession). The
          menu will flicker annoyingly. Calling ProcessMessages fixes this. }
        Application.ProcessMessages;

        { Bring the main form or its modal dialog to the foreground.
          This also ensures the popup menu closes after it loses focus. }
        SetForegroundWindow((Owner as TWinControl).Handle);
{
This seems unnecessary(?):
        if Screen.ActiveControl <> nil then
          if (Screen.ActiveControl.Owner is TWinControl) then
            SetForegroundWindow((Screen.ActiveControl.Owner as TWinControl).Handle);
}
        // Now make the menu pop up
        PopupMenu.PopupComponent := Self;
        PopupMenu.Popup(CursorPos.X, CursorPos.Y);
        // Post an empty message to make the popup menu disappear
        PostMessage((Owner as TWinControl).Handle, WM_NULL, 0, 0);
      end;
end;


procedure TCoolTrayIcon.Click;
begin
  // Execute user-assigned method
  if Assigned(FOnClick) then
    FOnClick(Self);
end;


procedure TCoolTrayIcon.DblClick;
begin
  // Execute user-assigned method
  if Assigned(FOnDblClick) then
    FOnDblClick(Self);
end;


procedure TCoolTrayIcon.MouseDown(Button: TMouseButton; Shift: TShiftState;
  X, Y: Integer);
begin
  // Execute user-assigned method
  if Assigned(FOnMouseDown) then
    FOnMouseDown(Self, Button, Shift, X, Y);
end;


procedure TCoolTrayIcon.MouseUp(Button: TMouseButton; Shift: TShiftState;
  X, Y: Integer);
begin
  // Execute user-assigned method
  if Assigned(FOnMouseUp) then
    FOnMouseUp(Self, Button, Shift, X, Y);
end;


procedure TCoolTrayIcon.MouseMove(Shift: TShiftState; X, Y: Integer);
begin
  // Execute user-assigned method
  if Assigned(FOnMouseMove) then
    FOnMouseMove(Self, Shift, X, Y);
end;


procedure TCoolTrayIcon.CycleIcon;
var
  NextIconIndex: Integer;
begin
  // Execute user-assigned method
  NextIconIndex := 0;
  if FIconList <> nil then
    if FIconIndex < FIconList.Count then
      NextIconIndex := FIconIndex +1;

  if Assigned(FOnCycle) then
    FOnCycle(Self, NextIconIndex);
end;


procedure TCoolTrayIcon.DoMinimizeToTray;
begin
  // Override this method to change automatic tray minimizing behavior
  HideMainForm;
  IconVisible := True;
end;


procedure Register;
begin
  RegisterComponents('Custom', [TCoolTrayIcon]);
end;

end.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丝袜亚洲另类欧美| 亚洲一区二区视频在线观看| 美女任你摸久久| 欧美精品少妇一区二区三区| 亚洲成人动漫在线免费观看| 精品污污网站免费看| 亚洲综合免费观看高清完整版在线 | 成人一级片在线观看| 国产精品丝袜在线| 92精品国产成人观看免费| 亚洲精品一二三| 欧美中文一区二区三区| 日韩国产成人精品| 欧美成人精品1314www| 国产馆精品极品| 亚洲天堂免费在线观看视频| 欧美影视一区在线| 奇米色一区二区| 国产日韩欧美激情| 91美女蜜桃在线| 日本成人在线电影网| 国产欧美一区二区精品性色| 99久久精品国产导航| 亚洲高清免费视频| 精品国产一区二区三区忘忧草| 国产精品一二三四| 亚洲精品成人精品456| 3atv一区二区三区| 成人午夜激情影院| 午夜电影一区二区| 久久久久国产免费免费| 色综合久久天天| 久久精品国产99国产精品| 国产日韩欧美一区二区三区乱码| 91成人国产精品| 激情另类小说区图片区视频区| 国产精品女同一区二区三区| 欧美福利视频一区| 成人美女视频在线看| 亚洲电影一区二区| 国产片一区二区| 欧美一区中文字幕| 成人av午夜影院| 美脚の诱脚舐め脚责91 | 欧美精品xxxxbbbb| 国产不卡视频在线观看| 日韩国产精品久久| 亚洲视频在线观看三级| 精品久久久三级丝袜| 欧美日韩免费高清一区色橹橹| 国产一区二区精品久久91| 亚洲一区二区三区美女| 国产精品理伦片| 国产精品少妇自拍| 欧美日韩一区二区三区四区| 成人精品视频一区二区三区| 精品系列免费在线观看| 亚洲v日本v欧美v久久精品| 亚洲国产精品二十页| 久久只精品国产| 日韩欧美国产一区二区三区| 欧美日韩国产另类一区| 色婷婷精品大在线视频| 成人涩涩免费视频| 国产尤物一区二区在线| 日本午夜一区二区| 亚洲小说欧美激情另类| 亚洲欧美日韩电影| 亚洲人被黑人高潮完整版| 国产日韩亚洲欧美综合| 久久久久国色av免费看影院| 久久网站最新地址| 久久免费看少妇高潮| 欧美精品一区二区久久久| 日韩欧美亚洲一区二区| 日韩午夜三级在线| 制服丝袜亚洲网站| 51精品久久久久久久蜜臀| 欧美视频在线一区二区三区| 欧洲精品在线观看| 在线一区二区三区四区| 色噜噜狠狠成人中文综合| 色香蕉成人二区免费| 色偷偷久久一区二区三区| 色综合天天综合色综合av| 色综合夜色一区| 在线亚洲人成电影网站色www| 色丁香久综合在线久综合在线观看| 色综合天天综合| 日本韩国欧美三级| 欧美日韩国产综合久久 | 国产电影一区在线| 欧美日韩一本到| 91成人免费在线视频| 在线成人免费观看| 欧美不卡一区二区三区四区| 久久综合九色欧美综合狠狠| 国产欧美一区二区精品久导航| 中文字幕第一区综合| 亚洲欧美色综合| 亚洲图片欧美一区| 久久电影网电视剧免费观看| 国产盗摄精品一区二区三区在线| aaa国产一区| 欧美亚洲国产一区在线观看网站| 欧美精品久久99久久在免费线| 日韩视频123| 欧美激情综合在线| 亚洲一区在线观看免费 | 蜜桃视频免费观看一区| 国产九色精品成人porny| 成人国产精品免费观看动漫 | 亚洲黄色小视频| 日韩电影在线一区二区三区| 国产精品资源站在线| 在线观看av不卡| 日韩欧美久久一区| 亚洲人成伊人成综合网小说| 午夜国产精品一区| 成人中文字幕电影| 在线观看欧美日本| 欧美精品一区二区久久婷婷| 一区二区三区在线看| 久久精品999| 91激情在线视频| 久久久亚洲欧洲日产国码αv| 亚洲男人天堂av网| 久久丁香综合五月国产三级网站| 99re这里只有精品首页| 精品国产一二三区| 亚洲精品国久久99热| 国产一区二三区| 欧美亚洲一区二区在线| 国产片一区二区三区| 日韩国产精品大片| 91碰在线视频| 久久伊人中文字幕| 五月综合激情婷婷六月色窝| 成人一级黄色片| 精品国产乱码久久久久久免费| 一区二区三区欧美日| 成人激情av网| 亚洲日本一区二区三区| 激情图区综合网| 正在播放亚洲一区| 亚洲精品一二三四区| 国产91精品入口| 欧美xxx久久| 偷拍一区二区三区| 在线影院国内精品| 综合激情网...| 国产成人av一区| 欧美成人激情免费网| 五月激情综合婷婷| 欧洲日韩一区二区三区| 亚洲视频 欧洲视频| 国产成人超碰人人澡人人澡| 精品国产电影一区二区| 麻豆一区二区三区| 欧美一级日韩不卡播放免费| 亚洲妇熟xx妇色黄| 日本久久电影网| 亚洲欧美日韩一区二区| av在线不卡免费看| 国产精品久久一卡二卡| 国产91丝袜在线播放0| 国产婷婷色一区二区三区在线| 精品一区二区三区久久| 91精品国产手机| 另类小说综合欧美亚洲| 日韩一级片在线播放| 蜜臀精品一区二区三区在线观看| 欧美日韩久久不卡| 日韩激情中文字幕| 日韩一区二区电影在线| 五月婷婷激情综合网| 欧美精品久久99久久在免费线 | 欧美国产亚洲另类动漫| 国产成人免费在线观看| 国产精品嫩草久久久久| 成人av免费网站| 亚洲色图视频网| 一本色道**综合亚洲精品蜜桃冫 | 在线观看国产91| 水蜜桃久久夜色精品一区的特点| 91精品国产色综合久久久蜜香臀| 美日韩一区二区| 国产亚洲欧美日韩在线一区| 成人免费精品视频| 亚洲欧美激情在线| 欧美日韩在线三级| av亚洲产国偷v产偷v自拍| 成人免费一区二区三区在线观看| 91捆绑美女网站| 亚洲成年人影院| 久久久久亚洲蜜桃| 成人avav在线| 亚洲第一狼人社区| 久久精品一区二区| 欧洲在线/亚洲|