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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? trayicon.pas

?? VC++實現的時間同步程序
?? PAS
字號:
{ TTrayIcon VCL. Version 1.3

  Requires:  Delphi 2.0 32 bit.

  Function: Adds an icon to the Windows 95 Tool Tray and
      has events to respond to mouse clicks.

  This component is based on the TToolIcon VCL that was written by
  Derek Stutsman (dereks@metronet.com).  He based his component on
  TWinControl, so it showed up as a clear, blank, resizable window at
  design time and also had more properties than the component actually
  needed.  This made it really hard to find on a busy form sometimes.

  I changed it so it would be based on TComponent so that it was readily
  visible at design time and also did not cover anything at run-time.
  The additional Top, left, width, etc. properties are also no longer
  necessary.  I added a ShowDesigning property so that you could test
  it at design time, but then turn it off so that TWO icons weren't shown
  on the tool tray when developing and testing.

  One strange anomaly that I worked around but don't know why it happens -
  if a ToolTip is not specified, then at run-time the icon shows up as
  blank.  If a ToolTip is specified, everything works fine.  To fix this,
  I set up another windows message that set the tool tip if it was blank -
  this ensures proper operation at all times, but I don't know why this
  is necessary.  If you can figure it out, send me some mail and let me
  know! (4/17/96 note - still no solution for this!)

  This is freeware (as was the original).  If you make cool changes to it,
  please send them to me.

  Enjoy!

  Pete Ness
  Compuserve ID: 102347,710
  Internet: 102347.710@compuserve.com
  http:\\ourworld.compuserve.com\homepages\peteness

  Release history:

  3/8/96 - Version 1.0
     Release by Derek Stutsman of TToolIcon version 1.0

  3/12/96 - Version 1.1

     Changed as outlined above by me (Pete Ness) and renamed to TTrayIcon.

  3/29/96 - Version 1.2
     Add default window handling to allow closing when Win95 shutdown.
     Previously, you had to manually close your application before closing
     Windows 95.

  4/17/96 - Version 1.3
     Added a PopupMenu property to automatically handle right clicking on
     the tray icon.
     Fixed bug that would not allow you to instantiate a TTrayIcon instance
     at run-time.
     Added an example program to show how to do some of the things I've
     gotten the most questions on.
     This version is available from my super lame web page - see above for
     the address.

  }



unit TrayIcon;

interface

uses
  SysUtils, Windows, Messages, Classes, Graphics, Controls, ShellAPI, Forms, menus;

const WM_TOOLTRAYICON = WM_USER+1;
      WM_RESETTOOLTIP = WM_USER+2;

type

  TTrayIcon = class(TComponent)

  private

  { Field Variables }

    IconData: TNOTIFYICONDATA;
    fIcon : TIcon;
    fToolTip : String;
    fWindowHandle : HWND;
    fActive : boolean;
    fShowDesigning : Boolean;

  { Events }

    fOnClick     : TNotifyEvent;
    fOnDblClick  : TNotifyEvent;
    fOnRightClick : TMouseEvent;
    fPopupMenu   : TPopupMenu;

    function AddIcon : boolean;
    function ModifyIcon : boolean;
    function DeleteIcon : boolean;

    procedure SetActive(Value : boolean);
    procedure SetShowDesigning(Value : boolean);
    procedure SetIcon(Value : TIcon);
    procedure SetToolTip(Value : String);
    procedure WndProc(var msg : TMessage);

    procedure FillDataStructure;
    procedure DoRightClick( Sender : TObject );    

  protected

  public

    constructor create(aOwner : TComponent); override;
    destructor destroy; override;

  published

    property Active : boolean read fActive write SetActive;
    property ShowDesigning : boolean read fShowDesigning write SetShowDesigning;
    property Icon : TIcon read fIcon write SetIcon;
    property ToolTip : string read fTooltip write SetToolTip;

    property OnClick     : TNotifyEvent read FOnClick write FOnClick;
    property OnDblClick  : TNotifyEvent read FOnDblClick write FOnDblClick;
    property OnRightClick : TMouseEvent  read FOnRightClick write FonRightClick;
    property PopupMenu : TPopupMenu read fPopupMenu write fPopupMenu;

  end;

procedure Register;

implementation

{$R TrayIcon.res}

procedure TTrayIcon.SetActive(Value : boolean);
begin
   if value <> fActive then begin
     fActive := Value;
     if not (csdesigning in ComponentState) then begin
        if Value then begin
           AddIcon;
        end else begin
           DeleteIcon;
        end;
     end;
  end;
end;

procedure TTrayIcon.SetShowDesigning(Value : boolean);
begin
  if csdesigning in ComponentState then begin
     if value <> fShowDesigning then begin
        fShowDesigning := Value;
        if Value then begin
           AddIcon;
        end else begin
           DeleteIcon;
        end;
     end;
  end;
end;

procedure TTrayIcon.SetIcon(Value : Ticon);
begin
  if Value <> fIcon then
    begin
      fIcon.Assign(value);
      ModifyIcon;
    end;
end;

procedure TTrayIcon.SetToolTip(Value : string);
begin

   // This routine ALWAYS re-sets the field value and re-loads the
   // icon.  This is so the ToolTip can be set blank when the component
   // is first loaded.  If this is changed, the icon will be blank on
   // the tray when no ToolTip is specified.

   if length( Value ) > 62 then
      Value := copy(Value,1,62);
   fToolTip := value;
   ModifyIcon;

end;

constructor TTrayIcon.create(aOwner : Tcomponent);
begin
  inherited create(aOwner);
  FWindowHandle := {$WARNINGS OFF} AllocateHWnd( WndProc ); {$WARNINGS ON}
  FIcon := TIcon.Create;
end;

destructor TTrayIcon.destroy;
begin

  if (not (csDesigning in ComponentState) and fActive)
     or ((csDesigning in ComponentState) and fShowDesigning) then
        DeleteIcon;

  FIcon.Free;
  {$WARNINGS OFF} DeAllocateHWnd( FWindowHandle ); {$WARNINGS ON} 
  inherited destroy;

end;

procedure TTrayIcon.FillDataStructure;
begin

  with IconData do begin

     cbSize := sizeof(TNOTIFYICONDATA);
     wnd := FWindowHandle;
     uID := 0; // is not passed in with message so make it 0
     uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP;
     hIcon := fIcon.Handle;
     StrPCopy(szTip,fToolTip);
     uCallbackMessage := WM_TOOLTRAYICON;

  end;

end;

function TTrayIcon.AddIcon : boolean;
begin
   FillDataStructure;
   result := Shell_NotifyIcon(NIM_ADD,@IconData);

   // For some reason, if there is no tool tip set up, then the icon
   // doesn't display.  This fixes that.

   if fToolTip = '' then
      PostMessage( fWindowHandle, WM_RESETTOOLTIP,0,0 );

end;

function TTrayIcon.ModifyIcon : boolean;
begin

   FillDataStructure;
   if fActive then
      result := Shell_NotifyIcon(NIM_MODIFY,@IconData)
   else
      result := True;

end;

procedure TTrayIcon.DoRightClick( Sender : TObject );
var MouseCo: Tpoint;
begin

   GetCursorPos(MouseCo);

   if assigned( fPopupMenu ) then begin
      SetForegroundWindow( Application.Handle );
      Application.ProcessMessages; 
      fPopupmenu.Popup( Mouseco.X, Mouseco.Y );
   end;

   if assigned( FOnRightClick ) then
      begin
         FOnRightClick(self,mbRight,[],MouseCo.x,MouseCo.y);
      end;
end;

function TTrayIcon.DeleteIcon : boolean;
begin
   result := Shell_NotifyIcon(NIM_DELETE,@IconData);
end;

procedure TTrayIcon.WndProc(var msg : TMessage);
begin
   with msg do
     if (msg = WM_RESETTOOLTIP) then
        SetToolTip( fToolTip )
     else if (msg = WM_TOOLTRAYICON) then begin
        case lParam of
           WM_LBUTTONDBLCLK   : if assigned (FOnDblClick) then FOnDblClick(self);
           WM_LBUTTONUP       : if assigned(FOnClick)then FOnClick(self);
           WM_RBUTTONUP       : DoRightClick(self);
        end;
     end
     else // Handle all messages with the default handler
        Result := DefWindowProc(FWindowHandle, Msg, wParam, lParam);

end;

procedure Register;
begin
  RegisterComponents('Win95', [TTrayIcon]);
end;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产酒店精品激情| 国产综合久久久久久鬼色 | 日韩免费看的电影| 精品久久久三级丝袜| 日韩精品一区二区三区在线| 久久综合九色综合97婷婷| 欧美一区二区三区不卡| 日韩一区二区三区免费观看| 日韩久久久久久| 日韩一级免费观看| 久久噜噜亚洲综合| 日本一区二区三区四区在线视频| 中文字幕+乱码+中文字幕一区| 久久久噜噜噜久久中文字幕色伊伊 | 亚洲女人小视频在线观看| 欧美成人精品福利| 国产欧美精品一区二区三区四区| 日韩美女视频一区二区| 日韩在线a电影| 国产精品一区二区在线观看不卡| 成人毛片老司机大片| 欧美日韩大陆在线| 国产日产精品一区| 免费观看一级欧美片| gogo大胆日本视频一区| 日韩视频中午一区| 洋洋av久久久久久久一区| 懂色中文一区二区在线播放| 欧美亚州韩日在线看免费版国语版| 91精品国产乱| 亚洲影视在线播放| 99国产精品99久久久久久| 久久一夜天堂av一区二区三区 | 成人精品小蝌蚪| 久久综合九色综合97婷婷女人 | 日韩女同互慰一区二区| 亚洲国产精品久久久久婷婷884| 成人国产电影网| 国产精品网站导航| 国产精品综合一区二区| 久久夜色精品国产噜噜av| 精品一区二区三区日韩| 精品理论电影在线| 国产在线视频不卡二| 久久久精品2019中文字幕之3| 麻豆91精品视频| 欧美精品乱码久久久久久 | 欧美二区三区的天堂| 91视频免费播放| 韩国精品一区二区| 国产麻豆视频一区| 亚洲综合小说图片| 亚洲情趣在线观看| 欧美极品少妇xxxxⅹ高跟鞋| 欧美一区二区三区电影| 免费成人在线播放| 精品99久久久久久| 日本久久一区二区三区| 麻豆精品在线视频| 亚洲欧美日韩电影| www激情久久| 在线观看av一区二区| 国产一区二区在线免费观看| ...xxx性欧美| 久久这里只有精品6| 欧美日韩高清一区二区三区| 高潮精品一区videoshd| 日本成人在线看| 亚洲午夜在线电影| 国产精品久久久久影院色老大| 欧美三电影在线| 99精品国产视频| 东方欧美亚洲色图在线| 蜜桃视频一区二区三区在线观看| 亚洲影院免费观看| 亚洲一区成人在线| 亚洲国产精品久久不卡毛片| 亚洲日本韩国一区| 美国十次综合导航| 久久蜜桃av一区二区天堂 | 成人黄色网址在线观看| 欧美性淫爽ww久久久久无| 丝袜脚交一区二区| 国产精品国产馆在线真实露脸 | 亚洲国产视频在线| 亚洲视频1区2区| 亚洲电影视频在线| 亚洲国产成人porn| 蜜臀国产一区二区三区在线播放| 亚洲午夜精品在线| 日本麻豆一区二区三区视频| 日韩av不卡在线观看| 国内精品免费**视频| 国产成人综合精品三级| 不卡一区二区中文字幕| av毛片久久久久**hd| 精品视频一区二区三区免费| 5858s免费视频成人| 国产亚洲一区字幕| 成人欧美一区二区三区白人| 亚洲国产cao| 国产一区二区在线免费观看| 91蝌蚪国产九色| 日韩亚洲欧美中文三级| 国产精品萝li| 久久99久久99小草精品免视看| 国产精品99久| 日韩丝袜情趣美女图片| 亚洲欧洲一区二区在线播放| 一区二区三区蜜桃| 国产一区二区三区不卡在线观看 | 国产精品久99| 久久精品国产精品亚洲红杏| 懂色av中文一区二区三区| 欧美三级三级三级| 中文字幕一区在线观看视频| 久久精品久久精品| 欧美区在线观看| 亚洲在线免费播放| 91黄色免费看| 亚洲乱码国产乱码精品精的特点| 国产在线精品视频| 日韩一区二区免费电影| 丝瓜av网站精品一区二区| 一本一道久久a久久精品| 中文字幕欧美区| 成人av网站在线观看免费| 久久理论电影网| 成人亚洲精品久久久久软件| 337p日本欧洲亚洲大胆精品| 国模少妇一区二区三区| 日韩一级片网址| 国产91丝袜在线18| 国产精品国产馆在线真实露脸| 成年人国产精品| 亚洲欧美电影一区二区| 欧美精品久久99| 美女精品自拍一二三四| 中文字幕精品一区二区精品绿巨人 | 欧美三区在线观看| 天堂在线亚洲视频| 精品久久人人做人人爰| 粉嫩一区二区三区性色av| 亚洲人成网站精品片在线观看| 日本人妖一区二区| 中文字幕一区在线观看视频| 日韩欧美在线观看一区二区三区| 亚洲精品日韩一| 中文字幕av在线一区二区三区| 777奇米成人网| 精品1区2区3区| 欧美无砖专区一中文字| 91影院在线观看| 成人深夜在线观看| av在线不卡电影| 99精品视频在线免费观看| 国产麻豆精品theporn| 久久国产夜色精品鲁鲁99| 青青国产91久久久久久| 亚洲影院免费观看| 一区二区在线观看视频在线观看| 国产欧美视频一区二区| 久久影院电视剧免费观看| 精品国产区一区| 精品久久久久久久久久久久久久久 | 秋霞午夜鲁丝一区二区老狼| 午夜精品久久久久影视| 水野朝阳av一区二区三区| 日韩精品一二区| 国产91在线观看丝袜| 97久久超碰精品国产| 色婷婷综合久久久| 7777精品伊人久久久大香线蕉最新版| 欧美性生活影院| 久久久久久免费网| 国产精品成人网| 亚洲欧美一区二区三区国产精品| 亚洲日本va在线观看| 亚洲高清在线精品| 国产美女精品人人做人人爽| 成人av在线看| 日韩三区在线观看| 国产精品久久久99| 天天综合色天天综合| 国产成人av影院| 欧美丝袜第三区| 国产亚洲精品精华液| 洋洋av久久久久久久一区| 国产精品一品二品| 日韩一区二区三免费高清| 亚洲天堂成人在线观看| 懂色av中文字幕一区二区三区| 精品国产人成亚洲区| 狠狠狠色丁香婷婷综合激情| 欧美mv和日韩mv的网站| 国产麻豆精品视频| www日韩大片| 喷白浆一区二区| 777午夜精品免费视频| 亚洲成人在线观看视频|