怎样才能知道有哪些应用程序把图标加入到了windows右下角的任务栏(tray)里?

解决方案 »

  1.   

    不知可否?
    hfw := findwindow('用其它软件查找的类', nil);
    再杖举里面的窗口.
    enumchildwindow(hfw, @proc, 0);
      

  2.   

    的确是窗口,但好像不是TrayNotifyWnd的子窗口。不知该怎门办?
    关注!!!
      

  3.   

    回复人: bottom(底) ( ) 信誉:55  2003-12-19 11:33:00  得分:0 
     
     
      VB确实是这样做的!
    Public Property Let Progress(Percent As Single)    If Percent < 0 Then
            hWndTray = 0
            SetCursorPos CursorPos.x, CursorPos.y
            Unload Me
          Else
            If hWndTray = 0 Then
                GetCursorPos CursorPos 'save cursor pos
                hWndTray = FindWindowEx(FindWindow("Shell_TrayWnd", ""), 0, "TrayNotifyWnd", "") 'find tray
                GetWindowRect hWndTray, WindowRect
                With WindowRect
                    Width = (.Right - .Left - 2) * 15 'adjust my size
                    Height = (.Bottom - .Top - 2) * 15
                End With
                PrintY = (ScaleHeight - TextHeight("A")) / 2 'vertical print pos
                SetParent hWnd, hWndTray 'tray is my parent
                ScaleWidth = 100 'percent
                FColor = ForeColor 'colors...
                If FColor < 0 Then
                    FColor = GetSysColor(FColor And &H7FFFFFFF)
                End If
                BColor = BackColor
                If BColor < 0 Then
                    BColor = GetSysColor(BColor And &H7FFFFFFF)
                End If
                BColor = Not (FColor Xor BColor)
                Show
            End If
            With Screen
                SetCursorPos .Width / .TwipsPerPixelX, .Height / .TwipsPerPixelY   'to make tray visible
            End With
            PrintPercent = Int(Percent) & "%"
            Cls
            CurrentX = 50 - TextWidth(PrintPercent) / 2
            CurrentY = PrintY
            Print PrintPercent
            Line (0, 0)-(Percent, Height), BColor, BF
        End IfEnd Property  
     
    学来的,但好像只能的到坐标,改一下可以得到个数。但不能得到究竟是啥程序的。SPY++看一下的确不是TrayNotifyWnd的子窗口。
      

  4.   

    here 邮箱
    多少分.??
      

  5.   

    如果您能实现我的要求,分全给您了,分如果不够可以令开帖子再加
    [email protected]
      

  6.   

    BCB的源码:
    ----------------------------------------
    http://www.maxss.net/download/index.asp
      

  7.   

    你需要我可以转换成delphi格式
      

  8.   

    楼主,我给你源码/  private
        { Private declarations }
        ficon:ticon;   //定义
        nid:tnotifyicondata;
      public
        { Public declarations }procedure TForm1.FormCreate(Sender: TObject);
    begin
     ficon:=ticon.Create;
     ficon.Handle:=loadicon(hinstance,'mainicon');
     if ficon.Handle=0 then
       begin
         messagedlg('不能打开图标!',mtError,[mbOK],0);
         application.Terminate;
         exit;
       end;
     with nid do
       begin
         cbsize:=sizeof(tnotifyicondata);
         wnd:=handle;
         uid:=trayiconid;
         uflags:=nif_message or nif_icon or nif_tip;
         ucallbackmessage:=0;
         hicon:=ficon.Handle;
         strpcopy(sztip,'漳百POS系统 软件设计:吴仕龙');
       end;
     shell_notifyicon(nim_add,@nid);
    end;
    //程序结束后加上以下两句
     shell_notifyicon(nim_delete,@nid);
     ficon.Free;
      

  9.   

    我不是想嫁个图标到任务栏,这个我会,我是想知道有哪些应用程序把图标加入到了windows右下角的任务栏(tray),