怎样隐含(或去除)托盘区中的指定的图标而不是中止程序?
如我在运行了拨号程序后在右下角托盘区显示出不断闪烁的电脑小图标,我想给他
去除或隐藏起来,但不能断开连接,请问如何?

解决方案 »

  1.   

    我这段代码是全部隐藏的代码而不是仅仅某个
    Public Sub HideTaskBarIcons()
        'This will hide any tool bars on the task bar.
        'This only applies to versions of window > 98
        
        Dim lngFindClass    As Long
        Dim lngHandle       As Long
        
        lngFindClass = FindWindow("Shell_TrayWnd", "")
        lngHandle = FindWindowEx(lngFindClass, _
                                 0, _
                                 "TrayNotifyWnd", _
                                 vbNullString)
        ShowWindow lngHandle, 0
    End SubPublic Sub ShowTaskBarIcons()
        'This will show any hidden active toolbars
        'on the task bar. See HideTaskbarIcons for
        'more details
        
        Dim lngFindClass    As Long
        Dim lngHandle       As Long
        
        lngFindClass = FindWindow("Shell_TrayWnd", "")
        lngHandle = FindWindowEx(lngFindClass, _
                                 0, _
                                 "TrayNotifyWnd", _
                                 vbNullString)
        ShowWindow lngHandle, 1
    End Sub