比如:使用delphi隐藏qq的系统托盘图标或FlashGet的系统托盘图标!

解决方案 »

  1.   

    如果隐藏自己定义的图标不难,要隐藏别的程序的图标就困难了.
    下面是我的设想,但没验证过.
    用HOOK勾住鼠标点击任务栏上图标的消息,取得点击处的坐标.因为图标在任务栏上一般都有一个装载窗口,根据坐标得到窗口的句柄,再调用SHOWWINDOW隐藏窗口.
      

  2.   

    Delphi托盘编程实战演练    DavidLove(原作)  
      
    关键字     RAD 托盘编程 任务栏 消息机制 
      
        很多人认为Delphi是一个RAD工具,包括我本人在上学的时候对Delphi也有偏见,现在走出了“象牙塔”,涉及的面广了,遇到的问题多了,慢慢地也有了自己的一点心得体会。其实,Delphi是基于Object Pascal 语言的开发工具,也就是说Delphi本质上是一种语言工具,并且是真正的面向对象的。下面我举的例子就是用Delphi实现的一个托盘小程序。程序短小精悍,脉络分明,我将对关键部分进行详细讲解。就象候俊杰先生把MFC一层一层地剥开一样,今天我也来一次“庖丁解牛”。   在Delphi中涉及到系统编程的方面毫无例外都要调用API函数,在ShellAPI.pas单元中有要用到的API函数的原型。实战演练:一.新建一个应用程序:File->New Applicaton 在Interface部分定义一个消息常量:const WM_NID=WM_USER+1000; 系统规定从WM_USER开始为用户自定义消息。二.定义一个全局变量: NotifyIcon:TNotifyIconData,NotifyIcon是非常重要的一个变量,整个程序基本上是围着这个变量在转。TNotifyIconData是一个记录类型,按住Ctrl键,在TNotifyIconData 双击即进入ShellAPI.pas单元。(注:在Delphi中,这是一个非常好的对源代码进行分析的方法,源代码说明一切,你要想知道程序背后的内幕,最好的方法就是分析源代码!)此时出现了以下赋值语句:TNotifyIconData = TNotifyIconDataA,这个意思很明显,就是说TNotifyIconData和TNotifyIconDataA是同种数据类型,接着往下看有:TNotifyIconDataA = _NOTIFYICONDATAA,意思与刚才的一样,再往下看:  type_NOTIFYICONDATAA = record       cbSize: DWORD;       Wnd: HWND;       uID: UINT;       uFlags: UINT;       uCallbackMessage: UINT;       hIcon: HICON;szTip: array [0..63] of AnsiChar;end;这可真是“千呼万唤始出来,犹抱琵琶半遮面”。现在大家很清楚了,我们刚才定义的全局变量NotifyIcon其实是一个包含有7个成分的记录类型变量,就相当于C/C++中的结构体变量(C/C++的程序员应该是再熟悉不过了)。下面我们逐个来解释记录类型中的7个部分各有什么功能。1>        cbSize就是你定义的NotifyIcon变量的大小,用SizeOf(TNotifyIconData)可以取得,如果你是一个熟练的C/C++程序员,你应该不会陌生。在C/C++中,每当要为一个结构体变量分配内存的时候都要:通过 SizeOf(Struct type) 来获知存放一个这样的结构体变量要多少内存。2>        Wnd是一个句柄,你希望托盘程序产生的消息有哪个窗体来处理就让Wnd指向那个窗体。例如:你准备在任务栏的托盘小图标上单击时窗体是窗体在“显示”和“隐藏”之间切换,则把Wnd指向主窗体。3>  uID:如果你要创建多个托盘小程序,那么怎么区分它们呢?就是靠这个ID号来区分。3>        uFlags是一个标志位,它表示当前所创建的托盘程序具有哪些性质:NIF_ICON          表示当前所设置的图标(即hIcon的值)是有效的 NIF_MESSAGE           表示当前所设置的系统消息(即uCallBackMessage的值)是有效的NIF_TIP             表示当前所设置的提示条(即szTip的值)是有效的。4>        uCallBackMessage这是7个部分里面最重要的一个。这里指定一个回调消息,也就是说这里定义一个消息名,当你单击或者右击托盘图标的时候就会向你在Wnd所指向的窗体发送一个在uCallBackMessage中定义的消息名,然后你在程序中定义一个消息出来函数来处理这个消息。这样就把Windows关于消息的整套流程都处理好了。 6>   hIcon为托盘图标的句柄,根据这个句柄你就可以增加、修改、删除图标。7>       szTip就是当你的鼠标放到任务栏托盘的小图标上的时候弹出来的提示信息。在这里我花了大量的笔墨介绍TNotifyIconData的内幕,把这部分搞清楚了,后面的东西就顺理成章了。三. 双击主窗体,进入FormCreate的代码区域:TForm1.FormCreate(Sender:TObject);Begin
     //NotifyIcon为全局变量,在程序的开头已经定义了
     with NotifyIcon do
        begin
           cbSize:=SizeOf(TNotifyIconData);
           Wnd:=Handle;   //指向当前窗体Form1的句柄
           uID:=1;
           uFlags:=NIF_ICON or NIF_MESSAGE or NIF_TIP;
           uCallBackMessage:=WM_NID;//自定义消息
           hIcon:=Application.Icon.Handle;
           szTip:=”张家恶少”;
        end;
    //把设置好的变量NotifyIcon加入到系统中以便处理
       Shell_NotifyIcon(NIM_ADD,@NotifyIcon);
    End;四.接下来就是定义一个消息处理函数:系统给窗体发来了一个消息,就由下面这个函数来处理。每个消息处理函数都是处理某一类消息的,大家仔细地看看下面函数体的定义和一般的函数定义有什么不一样:消息处理函数要在后面加上消息的名称,这样当系统发来WM_NID消息时,就是自动触发WMNID消息处理函数。procedure WMNID(var msg:TMessage);message WM_NID;       begin        case msg.LParam of            WM_LBUTTONUp: Form1.Visible:=not Form1.Visible;           WM_RBUTTONUP: ShowMessage(‘您点击的是右键’);        End;End;好了,一个最简单的程序诞生了,大家自己设置好自己喜欢的图标.Project->Options,选中Application页面,在Icon项中加载自己喜欢的图标,这样程序运行时,在任务栏里显示的就是你喜欢的图标了。当你单击图标时,窗体Form1会在可见与不可见之间切换,也就是说单击一下显示,再单击一下又隐藏。当你右击图标的时候会弹出一条消息:“你点击的是右键”。五.最后要记住在关闭应用程序的时候要释放掉建立的托盘程序,否则会占用系统资源。TForm1.FormDestroy(Sender:TObject);Begin  Shell_NotifyIcon(NIM_DELETE,@NotifyIcon);End; 毕业快半年了,很多东西在学校总理解不了,认识不够深刻;出到社会,接触了不少道中朋友,受益非浅,每有心得体会,总想写成文字,一来总结自己学的东西,二来和大家共同交流。
      

  3.   

    to fengyvn(¤绮文≌夫人¤) 
      系统托盘区,是一个ToolBar,而ToolBar上的ToolButton是没有Handle的!
      

  4.   

    ?是TOOLBUTTON?
    加载图标之前都会在工具栏上先定义窗口,每个图标都有各自独立的窗口.你生成图标的时候不用给TNOTIFYICONDATA结构中的HWND属性赋值?
    我认为关键是想办法找到那个窗口句柄.
      

  5.   

    对,每个图标都有一个装载窗口.包括子窗体在内.你用EnumWindows()函数试试.
    我列举出了任务栏上所有图标,包括NORTON和QQ在内.
    找到窗口名后再用FINDWINDOWS试试看能不能找到窗口句柄.
      

  6.   

    系统托盘是ToolBar,系统托盘图标是ToolButton。ToolButton没有句柄,你可以使用FindWindowsEx或者回调函数EnumWindows找找看!我没有找到!
      

  7.   

    你自己在任伤栏上生成一个图标看,然后指定标题.用ENUMWINDOWS一定找得到.这是回调函数的代码.
    ----------------------------
    procedure addwindowInfo(hw:Hwnd);stdcall;//指定回调函数
    var
      windowname,windowclass:array[0..144] of char;
      windowInfo:TWindowInfo;
    begin
      GetWindowText(hw,windowname,144);
      GetClassName(hw,windowclass,144);
      windowInfo:=TWindowInfo.Create;
      with windowinfo do
      begin
        setlength(winname,strlen(windowname));
        setlength(winclass,strlen(windowclass));
        winname:=strpas(windowname);
        winclass:=strpas(windowclass);
      end;
      Form1.ListBox1.Items.AddObject('',windowinfo);
    end;procedure TForm1.FormDestroy(Sender: TObject);
    var
      i:integer;
    begin
      for i:=0 to Listbox1.Items.Count-1 do
        Listbox1.Items.Objects[i].Free;
    end;procedure TForm1.windowinfoSectionResize(HeaderControl: THeaderControl;
      Section: THeaderSection);
    begin
      Listbox1.Invalidate;
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
      ListBox1.Items.Clear;
      EnumWindows(@addwindowinfo,0);
    end;procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;
      Rect: TRect; State: TOwnerDrawState);
    begin
       Listbox1.Canvas.FillRect(Rect);
      with TWindowInfo(Listbox1.Items.Objects[index]) do
      begin
        DrawText(Listbox1.canvas.Handle,Pchar(winname),length(winname),Rect,dt_left or dt_vCenter );
        Rect.Left:=Rect.Left+windowinfo.Sections[0].Width;
        DrawText(Listbox1.Canvas.Handle,Pchar(winclass),length(winclass),Rect,dt_left or dt_wordbreak);
      end;
    end;
    ---------------------
    我试了很多次都找到了.
      

  8.   

    to fengyvn(¤绮文≌夫人¤) 
       代码多处调试不通,请说一下您在什么系统下通过的。
       TWindowInfo是Record,没有Create方法。
      

  9.   

    只提一点:EnumWindow的方法是行不通的!^-^
      

  10.   


                        ◢██◣      
                 ◢██████████◣     
               ◢◣███████████◤     
            ◢████◥██████◤         
       ◢█████████   ███◤          
       █████████◤  ◢████████◣     
       ◥███████◤  ◢█████████◤     
        ◥██████   ███◤  ████      
            ███  ◢██ ◢█◣◥███      
            ███  ███ ███ ███      
            ███  ███ ███ ███      
            ███  ███ ███ ███      
            ███  ███ ███ ███      
            ███  ███◢██◤ ███      
            ███  ██████ ◢███      
        ◢██████  ◥█◤██◤ ◥███      
        ◥██████    ◢██ ◢███◤      
          ◥████   ◢███ ◥███◣      
            ◥█◤  ◢███◤  ████◣     
                ◢███◤   ◥████     
               ◢███◤     ◥███     
               ◥█◤        ◥█◤     █████████
    █┏━━━━━┓█
    █★专业灌水证★█
    █ 中国CSDN协会 █
    █ ☆荣誉颁发☆ █
    █  【黄花菜】  █
    █★专业灌水证★█
    █┗━━━━━┛█
    █████████
    灌就一个字  我只灌N次 你知道我只会用脸盆表示~~~ 
      

  11.   

    忘了.
    TWindowInfo=class
        winname:string;
        winclass:string;
    end;
      

  12.   

    注意楼上的这句话
    2>        Wnd是一个句柄,你希望托盘程序产生的消息有哪个窗体来处理就让Wnd指向那个窗体。
    说明图标就是用窗体装载的.而且支持窗体消息过程的处理.
      

  13.   

    to fengyvn(¤绮文≌夫人¤) 
        谢谢你的支持。但是,我用你的代码找出来的是所有可见和不可见窗体的Name和ClassName,没有一个是托盘上的东西呀!!把你的程序发到
      

  14.   

    function addwindowInfo(hw:Hwnd):boolean;stdcall;
    var
      windowname,windowclass:array[0..144] of char;
      windowInfo:TWindowInfo;
    //  winname,winclass :string;
    begin
      GetWindowText(hw,windowname,144);
      GetClassName(hw,windowclass,144);
      windowInfo:=TWindowInfo.Create;
      with windowinfo do
      begin
        setlength(winname,strlen(windowname));
        setlength(winclass,strlen(windowclass));
        winname:=strpas(windowname);
        winclass:=strpas(windowclass);
      
      Form1.Memo1.Lines.Add('文件名: '+winname+' '+'类名: '+winclass);
      end;
      Result:=true;
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
     Form1.Memo1.Lines.Clear;
      EnumWindows(Pointer(@addwindowinfo),0);
    end;
      

  15.   

    文件名: TF_FloatingLangBar_WndTitle 类名: CiceroUIWndFrame
    文件名: CiceroUIWndFrame 类名: CiceroUIWndFrame
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: WorkerW
    文件名:  类名: tooltips_class32
    文件名:  类名: Shell_TrayWnd
    文件名:  类名: Afx:2b10000:3:10011:c81010c2:0
    文件名:  类名: tooltips_class32
    文件名: Game<-->QQ Exchange Dlg 类名: #32770
    文件名: TE-Oicq Receive Dlg 类名: #32770
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: #32770
    文件名: 分组信息提示: 类名: #32770
    文件名:  类名: #32770
    文件名: CodeParamWindow 类名: TTokenWindow
    文件名:  类名: tooltips_class32
    文件名:  类名: BaseBar
    文件名:  类名: tooltips_class32
    文件名:  类名: BaseBar
    文件名:  类名: BaseBar
    文件名:  类名: BaseBar
    文件名:  类名: tooltips_class32
    文件名:  类名: TDaoHangJIngling
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: #32770
    文件名:  类名: TForm3
    文件名:  类名: Auto-Suggest Dropdown
    文件名: SysFader 类名: SysFader
    文件名: RavMon.exe 类名: RavMonClass
    文件名:  类名: Afx:2b10000:0
    文件名: 请稍候 类名: #32770
    文件名:  类名: Afx:400000:0
    文件名:  类名: tooltips_class32
    文件名: 阿贡程序小管家 类名: TForm1
    文件名:  类名: tooltips_class32
    文件名: 批量测试网址 类名: TfrmTester
    文件名:  类名: BaseBar
    文件名:  类名: BaseBar
    文件名:  类名: _WwM
    文件名:  类名: BaseBar
    文件名:  类名: Auto-Suggest Dropdown
    文件名:  类名: Auto-Suggest Dropdown
    文件名:  类名: ComboLBox
    文件名:  类名: BaseBar
    文件名:  类名: tooltips_class32
    文件名: 导航面板 类名: TfrmDaohangMainban
    文件名:  类名: BaseBar
    文件名:  类名: BaseBar
    文件名:  类名: BaseBar
    文件名:  类名: BaseBar
    文件名:  类名: BaseBar
    文件名:  类名: BaseBar
    文件名:  类名: BaseBar
    文件名:  类名: BaseBar
    文件名: SysFader 类名: SysFader
    文件名:  类名: Auto-Suggest Dropdown
    文件名: SysFader 类名: SysFader
    文件名: 发送失败的邮件列表 类名: #32770
    文件名:  类名: tooltips_class32
    文件名: NetDDE Agent 类名: NDDEAgnt
    文件名:  类名: tooltips_class32
    文件名:  类名: AfxWnd42
    文件名:  类名: #32770
    文件名: Form1 类名: TForm1
    文件名: Project1 类名: TApplication
    文件名: Object Inspector 类名: TPropertyInspector
    文件名: var   TWindowInfo.winclass: String - Unit1.pas (21) 类名: THintWindow
    文件名: Database Engine Error 类名: TDbEngineErrorDlg
    文件名: Delphi 7 - Project1 [Running] 类名: TAppBuilder
    文件名: Unit1.pas 类名: TEditWindow
    文件名:  类名: tooltips_class32
    文件名: Object TreeView 类名: TObjectTreeView
    文件名: Form1 类名: TForm1
    文件名: Translation Manager 类名: TITEfrmMain
    文件名: Align 类名: TAlignPalette
    文件名: Translation Repository - D:\Program Files\Borland\Delphi7\Bin\default.rps 类名: TfrmRepository
    文件名: Search 类名: TfrmITESearchForm
    文件名: Search results 类名: TfrmITESearchResults
    文件名: Select a Font 类名: TfrmSelectFontDlg
    文件名: Project Manager 类名: TProjectManagerForm
    文件名: Delphi 7 类名: TApplication
    文件名: 查找 类名: #32770
    文件名:  类名: tooltips_class32
    文件名: C_Lib_Wnd.cpp - 写字板 类名: WordPadClass
    文件名: DDE Server Window 类名: OleDdeWndClass
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名:  类名: MSIE4.0 Webvw.DLL ThumbCtl
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: WorkerW
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名: F:\阿贡产品\dpg3\进程间谍1.0.6.0 类名: CabinetWClass
    文件名:  类名: tooltips_class32
    文件名:  类名: Afx:21c0000:0
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名: 与 king 聊天中 类名: #32770
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: WorkerW
    文件名: 欢迎来到CSDN新版论坛 - Microsoft Internet Explorer 类名: IEFrame
    文件名:  类名: CicLoaderWndClass
    文件名: DBK 类名: BCWDBKSYNCHWND
    文件名: KibitzWindow 类名: TCodeCompleteListView
    文件名:  类名: ComboLBox
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名: MCI command handling window 类名: #43
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: tooltips_class32
    文件名:  类名: Shell Embedding
    文件名:  类名: Shell Embedding
    文件名:  类名: Shell Embedding
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: tooltips_class32
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: DDEMLMom
    文件名:  类名: DDEMLEvent
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: ToolbarWindow32
    文件名:  类名: ToolbarWindow32
    文件名:  类名: ToolbarWindow32
    文件名:  类名: ToolbarWindow32
    文件名:  类名: ToolbarWindow32
    文件名:  类名: Afx:400000:0
    文件名: 自动图文集 类名: MsoCommandBarPopup
    文件名: “自动图文集”类别 类名: MsoCommandBarPopup
    文件名: 系统保护与监视系统概要设计1.doc - Microsoft Word 类名: OpusApp
    文件名: 填充颜色 类名: MsoCommandBarPopup
    文件名: 填充颜色(黄色) 类名: OfficeTooltip
    文件名:  类名: tooltips_class32
    文件名: 我的网址.erb - 网址书库2.0.1.8 类名: TForm1
    文件名: 文件属性 类名: TfrmFileProperty
    文件名: 网址书库2.0.1.8 类名: TApplication
    文件名:  类名: Afx:400000:0
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名: delphi - 网文快捕 类名: TMainForm
    文件名: 网文快捕 3.66 类名: TApplication
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: Afx:21c0000:0
    文件名:  类名: tooltips_class32
    文件名:  类名: Afx:21c0000:0
    文件名:  类名: Afx:21c0000:0
    文件名:  类名: Afx:21c0000:0
    文件名:  类名: Afx:21c0000:0
    文件名:  类名: Afx:21c0000:0
    文件名:  类名: tooltips_class32
    文件名:  类名: Afx:21c0000:0
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
      

  16.   

    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名: MCI command handling window 类名: #43
    文件名:  类名: Internet Explorer_Hidden
    文件名: DDE Server Window 类名: OleDdeWndClass
    文件名: Acrobat IEHelper 类名: Acrobat IEHelper Object
    文件名:  类名: tooltips_class32
    文件名:  类名: ComboLBox
    文件名:  类名: DDEMLEvent
    文件名:  类名: DDEMLMom
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名: 法律常识 类名: HH Parent
    文件名: MCI command handling window 类名: #43
    文件名: 历史备忘录 类名: #32770
    文件名:  类名: tooltips_class32
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:21c0000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名: I:/其他安装包/聊天/QQ2003III/QQ.exe{7E912E25-2182-40e7-913A-09D22A3F9E08} 类名: #32770
    文件名:  类名: oicq2000countwnd
    文件名:  类名: Afx:400000:0
    文件名: 阿贡程序小管家 类名: TApplication
    文件名:  类名: tooltips_class32
    文件名: UnitHideProcess.cpp - 写字板 类名: WordPadClass
    文件名:  类名: TPUtilWindow
    文件名: Borland C++Builder Help 类名: MS_WINDOC
    文件名: Borland C++Builder Help 类名: MS_WINTOPIC_SECONDARY
    文件名:  类名: ToolbarWindow32
    文件名:  类名: ToolbarWindow32
    文件名:  类名: ToolbarWindow32
    文件名: MCI command handling window 类名: #43
    文件名: DDE Server Window 类名: OleDdeWndClass
    文件名:  类名: Internet Explorer_Hidden
    文件名:  类名: ActiveClipBoard
    文件名:  类名: ThunderMain
    文件名: DDE Server Window 类名: OleDdeWndClass
    文件名:  类名: MsoStdCompMgr
    文件名: File Open Message Window 类名: File Open Message Window
    文件名:  类名: SysPager
    文件名:  类名: ToolbarWindow32
    文件名:  类名: Layered Provider Async Window
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: WorkerW
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名: MCI command handling window 类名: #43
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: Internet Explorer_Hidden
    文件名:  类名: ComboLBox
    文件名:  类名: ComboLBox
    文件名:  类名: ToolbarWindow32
    文件名:  类名: ToolbarWindow32
    文件名:  类名: ComboLBox
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: DDEMLEvent
    文件名:  类名: DDEMLMom
    文件名:  类名: ToolbarWindow32
    文件名:  类名: ToolbarWindow32
    文件名:  类名: ToolbarWindow32
    文件名:  类名: ToolbarWindow32
    文件名: MCI command handling window 类名: #43
    文件名:  类名: Internet Explorer_Hidden
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: SysPager
    文件名:  类名: ToolbarWindow32
    文件名: MCI command handling window 类名: #43
    文件名:  类名: Inet Notify_Hidden
    文件名: Acrobat IEHelper 类名: Acrobat IEHelper Object
    文件名:  类名: tooltips_class32
    文件名:  类名: ComboLBox
    文件名: ModemDeviceChange 类名: MdmDevChg
    文件名:  类名: tooltips_class32
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名:  类名: TPUtilWindow
    文件名: SaSkdaForm 类名: TSaSkdaForm
    文件名:  类名: TPUtilWindow
    文件名:  类名: CTrayIconWndClass
    文件名: newadmin 类名: TApplication
    文件名: 瑞星杀毒软件--定时查杀毒程序 类名: RavTimer
    文件名:  类名: SecDaemon
    文件名:  类名: SecWtchdg
    文件名: 电源表 类名: SystemTray_Main
    文件名: Connections Tray 类名: Connections Tray
    文件名:  类名: WorkerW
    文件名: DDE Server Window 类名: OleDdeWndClass
    文件名:  类名: DDEMLEvent
    文件名:  类名: DDEMLMom
    文件名: SYSTEM AGENT COM WINDOW 类名: SAGEWINDOWCLASS
    文件名: MM Notify Callback 类名: MM Notify Callback
    文件名: MS_WebcheckMonitor 类名: MS_WebcheckMonitor
    文件名: I:/其他安装包/聊天/QQ2003III/QQ.exeD414641A-643F-4547-8459-D36F7EE9BB0D 类名: I:/其他安装包/聊天/QQ2003III/QQ.exeD414641A-643F-4547-8459-D36F7EE9BB0D
    文件名:  类名: Afx:2b10000:0
    文件名:  类名: #32770
    文件名:  类名: Afx:2e60000:0
    文件名:  类名: Afx:3490000:0
    文件名:  类名: Afx:36e0000:0
    文件名: Socket Notification Sink 类名: Afx:400000:0
    文件名:  类名: Afx:36e0000:0
    文件名:  类名: Afx:36e0000:0
    文件名:  类名: Afx:3c50000:0
    文件名:  类名: Afx:3c50000:0
    文件名:  类名: Afx:3c50000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: Afx:400000:0
    文件名:  类名: ComboLBox
    文件名: MAIL_DEBUG 类名: Afx:400000:2
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名:  类名: tooltips_class32
    文件名: 进程间谍1.0.6.0 类名: TfmTaskMain
    文件名: 位置设置 类名: TfmSetPosition
    文件名: ECHO拷贝 类名: TfmBat
    文件名: 进程间谍1.0.6.0 类名: TApplication
    文件名: Program Manager 类名: Progman
    文件名: Default IME 类名: IME
    文件名: Default IME 类名: IME
    文件名: Default IME 类名: IME
    文件名: Default IME 类名: IME
    文件名: Default IME 类名: IME
    文件名: Default IME 类名: IME
    文件名: Default IME 类名: IME
    文件名: Default IME 类名: IME
    文件名: Default IME 类名: IME
    文件名: Default IME 类名: IME
    文件名: Default IME 类名: IME
    文件名: Default IME 类名: IME
    文件名:  类名: ImeStatusPHON    
    文件名:  类名: ImeCompPHON    
    文件名: Phonetic 类名: Phonetic
      

  17.   

    找到的是托盘图标的窗体的句柄。怎么把托盘图标隐藏呢?我使用ShowWindow只能隐藏窗体,我也用Shell_NotifyIcon(NIM_DELETE,@NotifyIcon)试过了,也不行~~我真的没有办法了!!!
      

  18.   

    似乎图标窗口的类型都是TPUTILWINDOW,你试试用Shell_NotifyIcon(NIM_DELETE,@NotifyIcon)
    NotifyIcon中的HWND值赋为找到的句柄.
      

  19.   

    简单.这个图标区实际上是个Toolbar
    找到其句柄再向其发送TB_DELETEBUTTON消息即可,我以前回答过类似问题,但找不到了...
      

  20.   

    国外有个软件可以做到,好像叫SynTrax什么的。
    我以前在坛子里也问过类似的问题,可没一个大佬帮我搞定,郁闷...
      

  21.   

    TB_DELETEBUTTON???
    delete其中哪个如何确定?
    根据ENUM的结构他的类名 toolbarwindow32
      

  22.   

    现在我已经能将托盘上的图标进行复制,就是不能删除。相同的代码,我控制delphi做的ToolBar可以,VC做的ToolBar也可以,可以把ToolBar上的ToolButton进行隐藏、复制、添加、删除,方法就是向ToolBar发消息。但是,一旦把消息的句柄变成系统托盘,Windows就会报错!!!郁闷~~~
      

  23.   

    to fengyvn(¤绮文≌夫人¤) 
        这个方法不行!to pankun(剑神一笑)(没空闭关-_-) 
        删了怎么恢复回来呢?国人也有实现了的!叫GoHide。大家可以下下来研究研究,
    http://gohide.zj.com/GoHideSetup.exe
      

  24.   

    TB_DELETEBUTTON???
    delete其中哪个如何确定?
      

  25.   

    to visual_cjiajia(bios(阿贡)) 
        SendMessage(Hwnd,TB_DELETEBUTTON,index,0)index为序号
      

  26.   

    感谢大哥!
    偶认为系统托盘的TOOLBAR可能被微软特制的了,不能当成一般的TOOLBAR考虑!
    个人见解!
      

  27.   

    还得再往底层 估计不是 简单的findwindow可以解决的,肯定是特殊的TOOLBAR 要不然就不叫
    “系统托盘!”
      

  28.   

    http://gohide.zj.com/GoHideSetup.exe
    偶这里怎么下载不了,天空网站上有吗?
      

  29.   

    工具栏的消息,你看看有没有自己要的.
    The following messages are used with toolbars.TB_ADDBITMAP
    TB_ADDBUTTONS
    TB_ADDSTRING
    TB_AUTOSIZE
    TB_BUTTONCOUNT
    TB_BUTTONSTRUCTSIZE
    TB_CHANGEBITMAP
    TB_CHECKBUTTON
    TB_COMMANDTOINDEX
    TB_CUSTOMIZE
    TB_DELETEBUTTON
    TB_ENABLEBUTTON
    TB_GETBITMAP
    TB_GETBITMAPFLAGS
    TB_GETBUTTON
    TB_GETBUTTONTEXT
    TB_GETITEMRECT
    TB_GETROWS
    TB_GETSTATE
    TB_GETTOOLTIPS
    TB_HIDEBUTTON
    TB_INDETERMINATE
    TB_INSERTBUTTON
    TB_ISBUTTONCHECKED
    TB_ISBUTTONENABLED
    TB_ISBUTTONHIDDEN
    TB_ISBUTTONINDETERMINATE
    TB_ISBUTTONPRESSED
    TB_PRESSBUTTON
    TB_SAVERESTORE
    TB_SETBITMAPSIZE
    TB_SETBUTTONSIZE
    TB_SETCMDID
    TB_SETPARENT
    TB_SETROWS
    TB_SETSTATE
    TB_SETTOOLTIPS
      

  30.   

    这个msdn有,delphi自带的windows sdk上也有!
      

  31.   

    获取系统托盘的任意一个图标的句柄并隐藏
    http://www.soulan.com/kingron/dispbbs.asp?boardID=17&ID=164&page=1