指点成金-最美分享吧

登录

WIN7任务栏每隔几十秒就会有一个相机和齿轮状标志的图标闪过导致游戏画面最小化,怎么回事?

佚名 举报

篇首语:本文由小编为大家整理,主要介绍了WIN7任务栏每隔几十秒就会有一个相机和齿轮状标志的图标闪过导致游戏画面最小化,怎么回事?相关的知识,希望对你有一定的参考价值。

这个可以肯定是你的一个软件出现了问题,至于哪个软件需要用跟踪软件来跟踪这个图标,我也是出现了同样的问题,非常郁闷,dota打2分钟跳出来一次啊,每次都被杀啊,那个不爽啊,终于找了一天找到了解决方法,也是从大神那个参照来的
下载并运行 Process Monitor
然後做一些必要设置
1. 按 Ctrl+E.
2. 按 Ctrl+X.
3. 按 Ctrl+L.
4. 在弹出的 "Process Monitor Filter" 窗体中, 删除所有已有过滤器.
5. 只添加一个过滤器 Column: Operation, Relation: is, Value: Process Start, Action: Include.
6. 然後重新按一下 Ctrl+E.
7. 这样一旦有进程启动, 那么就会被 Process Monitor 记录下来.
8. 记录的信息, 包含映像文件路径.
9. 双击要查看进程, 弹出 "Event Properties" 窗体, 单击 "Process" 选项卡.
下载地址:
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
这种方法很好,但是操作起来是有点麻烦,特别是那个软件全英文啊,我也是摸索了一会儿才搞定,找到记录的文件路径后把作怪的软件卸载,或者只把该文件夹及其下文件删除即可解决。
我自己又摸索出来一个新的方法,
如下:360杀毒里面有个“进程追踪”,打开以后去找到反复出现的进程,在命令行里面可以看到该进程的文件路径,也就是捣乱文件的文件夹,你就可以知道是哪个软件出了问题,卸载该软件或者删除相应的文件,问题即可解决
参考技术A 遇到同样的问题,找了单位的IT工程师也没解决,最后请教了同学、亲戚很多高人,刚刚找到了解决方案。
第一步:CTRL+ALT+DELETE启动任务管理器
第二步:选择上面的服务标签
第三步:选择右下角的服务按钮
第四步:开启新窗口,找到Interactive Services Detection
第五步:双击,停止服务
第六步:右键点击,禁用
彻底清净了……
参考技术B 我前几天遇到和你一样的问题,闪过的图标也是一样的,hoho。显示C盘隐藏的文件,找到C://prograndata/mobile partner/删一删onlineupdate文件夹就可以了。里面有些文件删不掉,哪些直接跳过就可以了,这个治标不治本,过段时间它会自动再生成。
把安装的华为3G网卡的相关软件卸载就治本了,不过每次使用3G卡得重新安装,重新卸载。
参考技术C 你可以用360安全卫士看下这个图标是什么程序,如果是没用的,卸载就行了。
如果是有用的,你玩游戏的时候又用不到,用360安全卫士设置禁用就行了。追问

360?找不到这个图标

参考技术D 同问 我也有这问题 还没解决 郁闷死了

Swift iOS -AshleyMills Reachability 每隔几秒就会打开和关闭 wifi

【中文标题】Swift iOS -AshleyMills Reachability 每隔几秒就会打开和关闭 wifi【英文标题】:Swift iOS -AshleyMills Reachability keeps toggling wifi on and off every few secs 【发布时间】:2018-05-03 17:49:50 【问题描述】:

我从AshleyMills Reachability下载了iOS示例Reachability项目

它有一个 networkStatus 标签,上面写着:WifiNo Connection

在它下面有一个 hostNameLabel,上面写着:No host namegoogle.cominvalidhost

当我在我的设备上运行该应用程序时,它每 5 秒以下列方式重复循环连接:

第一个 5 秒:

第二个 5 秒:

第三个​​ 5 秒:

从第 1 次、第 2 次和第 3 次重新开始循环并不断重复。

我使用的是家庭 wifi,并且我的互联网连接很好(任何其他应用程序都没有问题)。 为什么它会像这样不断循环,而不是停留在Wifi + google.com(第二个循环)

ViewController 文件:

class ViewController: UIViewController     let networkStatus: UILabel =         let label = UILabel()        label.translatesAutoresizingMaskIntoConstraints = false        label.font = UIFont.systemFont(ofSize: 21)        label.textColor = .black        label.numberOfLines = 0        label.sizeToFit()        label.text = "Status"        label.textAlignment = .center        return label    ()    let hostNameLabel: UILabel =         let label = UILabel()        label.translatesAutoresizingMaskIntoConstraints = false        label.font = UIFont.systemFont(ofSize: 21)        label.textColor = .black        label.numberOfLines = 0        label.sizeToFit()        label.text = "Host"        label.textAlignment = .center        return label    ()    var reachability: Reachability?    let hostNames = [nil, "google.com", "invalidhost"]    var hostIndex = 0    override func viewDidLoad()         super.viewDidLoad()        setConstraints()        startHost(at: 0)        func startHost(at index: Int)         stopNotifier()        setupReachability(hostNames[index], useClosures: true)        startNotifier()        DispatchQueue.main.asyncAfter(deadline: .now() + 5)             self.startHost(at: (index + 1) % 3)                func setupReachability(_ hostName: String?, useClosures: Bool)         let reachability: Reachability?        if let hostName = hostName             reachability = Reachability(hostname: hostName)            hostNameLabel.text = hostName         else             reachability = Reachability()            hostNameLabel.text = "No host name"                self.reachability = reachability        print("--- set up with host name: (hostNameLabel.text!)")        if useClosures             reachability?.whenReachable =  reachability in                self.updateLabelColourWhenReachable(reachability)                        reachability?.whenUnreachable =  reachability in                self.updateLabelColourWhenNotReachable(reachability)                     else             NotificationCenter.default.addObserver(                self,                selector: #selector(reachabilityChanged(_:)),                name: .reachabilityChanged,                object: reachability            )                func startNotifier()         print("--- start notifier")        do             try reachability?.startNotifier()         catch             networkStatus.textColor = .red            networkStatus.text = "Unable to start
notifier"            return                func stopNotifier()         print("--- stop notifier")        reachability?.stopNotifier()        NotificationCenter.default.removeObserver(self, name: .reachabilityChanged, object: nil)        reachability = nil        func updateLabelColourWhenReachable(_ reachability: Reachability)         print("(reachability.description) - (reachability.connection)")        if reachability.connection == .wifi             self.networkStatus.textColor = .green         else             self.networkStatus.textColor = .blue                self.networkStatus.text = "(reachability.connection)"        func updateLabelColourWhenNotReachable(_ reachability: Reachability)         print("(reachability.description) - (reachability.connection)")        self.networkStatus.textColor = .red        self.networkStatus.text = "(reachability.connection)"        @objc func reachabilityChanged(_ note: Notification)         let reachability = note.object as! Reachability        if reachability.connection != .none             updateLabelColourWhenReachable(reachability)         else             updateLabelColourWhenNotReachable(reachability)                func setConstraints()        view.addSubview(networkStatus)        view.addSubview(hostNameLabel)        networkStatus.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 8).isActive = true        networkStatus.rightAnchor.constraint(equalTo: view.rightAnchor, constant: -8).isActive = true        networkStatus.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true        hostNameLabel.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 8).isActive = true        hostNameLabel.rightAnchor.constraint(equalTo: view.rightAnchor, constant: -8).isActive = true        hostNameLabel.topAnchor.constraint(equalTo: networkStatus.bottomAnchor, constant: 20).isActive = true        deinit         stopNotifier()    

可达性文件:

import SystemConfigurationimport Foundationpublic enum ReachabilityError: Error     case FailedToCreateWithAddress(sockaddr_in)    case FailedToCreateWithHostname(String)    case UnableToSetCallback    case UnableToSetDispatchQueue@available(*, unavailable, renamed: "Notification.Name.reachabilityChanged")public let ReachabilityChangedNotification = NSNotification.Name("ReachabilityChangedNotification")extension Notification.Name     public static let reachabilityChanged = Notification.Name("reachabilityChanged")func callback(reachability: SCNetworkReachability, flags: SCNetworkReachabilityFlags, info: UnsafeMutableRawPointer?)     guard let info = info else  return     let reachability = Unmanaged.fromOpaque(info).takeUnretainedValue()    reachability.reachabilityChanged()public class Reachability     public typealias NetworkReachable = (Reachability) -> ()    public typealias NetworkUnreachable = (Reachability) -> ()    @available(*, unavailable, renamed: "Connection")    public enum NetworkStatus: CustomStringConvertible         case notReachable, reachableViaWiFi, reachableViaWWAN        public var description: String             switch self             case .reachableViaWWAN: return "Cellular"            case .reachableViaWiFi: return "WiFi"            case .notReachable: return "No Connection"                            public enum Connection: CustomStringConvertible         case none, wifi, cellular        public var description: String             switch self             case .cellular: return "Cellular"            case .wifi: return "WiFi"            case .none: return "No Connection"                            public var whenReachable: NetworkReachable?    public var whenUnreachable: NetworkUnreachable?    @available(*, deprecated: 4.0, renamed: "allowsCellularConnection")    public let reachableOnWWAN: Bool = true    /// Set to `false` to force Reachability.connection to .none when on cellular connection (default value `true`)    public var allowsCellularConnection: Bool    // The notification center on which "reachability changed" events are being posted    public var notificationCenter: NotificationCenter = NotificationCenter.default    @available(*, deprecated: 4.0, renamed: "connection.description")    public var currentReachabilityString: String         return "(connection)"        @available(*, unavailable, renamed: "connection")    public var currentReachabilityStatus: Connection         return connection        public var connection: Connection         guard isReachableFlagSet else  return .none         // If we"re reachable, but not on an iOS device (i.e. simulator), we must be on WiFi        guard isRunningOnDevice else  return .wifi         var connection = Connection.none        if !isConnectionRequiredFlagSet             connection = .wifi                if isConnectionOnTrafficOrDemandFlagSet             if !isInterventionRequiredFlagSet                 connection = .wifi                            if isOnWWANFlagSet             if !allowsCellularConnection                 connection = .none             else                 connection = .cellular                            return connection        fileprivate var previousFlags: SCNetworkReachabilityFlags?    fileprivate var isRunningOnDevice: Bool =         #if targetEnvironment(simulator)        return false        #else        return true        #endif    ()    fileprivate var notifierRunning = false    fileprivate let reachabilityRef: SCNetworkReachability    fileprivate let reachabilitySerialQueue = DispatchQueue(label: "uk.co.ashleymills.reachability")    fileprivate var usingHostname = false    required public init(reachabilityRef: SCNetworkReachability, usingHostname: Bool = false)         allowsCellularConnection = true        self.reachabilityRef = reachabilityRef        self.usingHostname = usingHostname        public convenience init?(hostname: String)         guard let ref = SCNetworkReachabilityCreateWithName(nil, hostname) else  return nil         self.init(reachabilityRef: ref, usingHostname: true)        public convenience init?()         var zeroAddress = sockaddr()        zeroAddress.sa_len = UInt8(MemoryLayout.size)        zeroAddress.sa_family = sa_family_t(AF_INET)        guard let ref = SCNetworkReachabilityCreateWithAddress(nil, &zeroAddress) else  return nil         self.init(reachabilityRef: ref)        deinit         stopNotifier()    public extension Reachability     // MARK: - *** Notifier methods ***    func startNotifier() throws         guard !notifierRunning else  return         var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil)        context.info = UnsafeMutableRawPointer(Unmanaged.passUnretained(self).toOpaque())        if !SCNetworkReachabilitySetCallback(reachabilityRef, callback, &context)             stopNotifier()            throw ReachabilityError.UnableToSetCallback                if !SCNetworkReachabilitySetDispatchQueue(reachabilityRef, reachabilitySerialQueue)             stopNotifier()            throw ReachabilityError.UnableToSetDispatchQueue                // Perform an initial check        reachabilitySerialQueue.async             self.reachabilityChanged()                notifierRunning = true        func stopNotifier()         defer  notifierRunning = false         SCNetworkReachabilitySetCallback(reachabilityRef, nil, nil)        SCNetworkReachabilitySetDispatchQueue(reachabilityRef, nil)        // MARK: - *** Connection test methods ***    @available(*, deprecated: 4.0, message: "Please use `connection != .none`")    var isReachable: Bool         guard isReachableFlagSet else  return false         if isConnectionRequiredAndTransientFlagSet             return false                if isRunningOnDevice             if isOnWWANFlagSet && !reachableOnWWAN                 // We don"t want to connect when on cellular connection                return false                            return true        @available(*, deprecated: 4.0, message: "Please use `connection == .cellular`")    var isReachableViaWWAN: Bool         // Check we"re not on the simulator, we"re REACHABLE and check we"re on WWAN        return isRunningOnDevice && isReachableFlagSet && isOnWWANFlagSet        @available(*, deprecated: 4.0, message: "Please use `connection == .wifi`")    var isReachableViaWiFi: Bool         // Check we"re reachable        guard isReachableFlagSet else  return false         // If reachable we"re reachable, but not on an iOS device (i.e. simulator), we must be on WiFi        guard isRunningOnDevice else  return true         // Check we"re NOT on WWAN        return !isOnWWANFlagSet        var description: String         let W = isRunningOnDevice ? (isOnWWANFlagSet ? "W" : "-") : "X"        let R = isReachableFlagSet ? "R" : "-"        let c = isConnectionRequiredFlagSet ? "c" : "-"        let t = isTransientConnectionFlagSet ? "t" : "-"        let i = isInterventionRequiredFlagSet ? "i" : "-"        let C = isConnectionOnTrafficFlagSet ? "C" : "-"        let D = isConnectionOnDemandFlagSet ? "D" : "-"        let l = isLocalAddressFlagSet ? "l" : "-"        let d = isDirectFlagSet ? "d" : "-"        return "(W)(R) (c)(t)(i)(C)(D)(l)(d)"    fileprivate extension Reachability     func reachabilityChanged()         guard previousFlags != flags else  return         let block = connection != .none ? whenReachable : whenUnreachable        DispatchQueue.main.async             if self.usingHostname                 print("USING HOSTNAME ABOUT TO CALL BLOCK")                        block?(self)            self.notificationCenter.post(name: .reachabilityChanged, object:self)                previousFlags = flags        var isOnWWANFlagSet: Bool         #if os(iOS)        return flags.contains(.isWWAN)        #else        return false        #endif        var isReachableFlagSet: Bool         return flags.contains(.reachable)        var isConnectionRequiredFlagSet: Bool         return flags.contains(.connectionRequired)        var isInterventionRequiredFlagSet: Bool         return flags.contains(.interventionRequired)        var isConnectionOnTrafficFlagSet: Bool         return flags.contains(.connectionOnTraffic)        var isConnectionOnDemandFlagSet: Bool         return flags.contains(.connectionOnDemand)        var isConnectionOnTrafficOrDemandFlagSet: Bool         return !flags.intersection([.connectionOnTraffic, .connectionOnDemand]).isEmpty        var isTransientConnectionFlagSet: Bool         return flags.contains(.transientConnection)        var isLocalAddressFlagSet: Bool         return flags.contains(.isLocalAddress)        var isDirectFlagSet: Bool         return flags.contains(.isDirect)        var isConnectionRequiredAndTransientFlagSet: Bool         return flags.intersection([.connectionRequired, .transientConnection]) == [.connectionRequired, .transientConnection]        var flags: SCNetworkReachabilityFlags         var flags = SCNetworkReachabilityFlags()        if SCNetworkReachabilityGetFlags(reachabilityRef, &flags)             print("Returning flags (flags)")            return flags         else             return SCNetworkReachabilityFlags()            

【问题讨论】:

这只是一个测试应用程序,演示了各种类型的连接会发生什么。首先没有主机,然后是 google.com ,然后是无效的主机名 我想通了。我实际上是在使用您的代码的另一个项目中使用它。它工作得很好。谢谢! 【参考方案1】:

我查看了代码并找到了答案。在ViewController 文件中,startHost() 函数中有一个定时器,每 5 秒循环一次。

func startHost(at index: Int)         stopNotifier()        setupReachability(hostNames[index], useClosures: true)        startNotifier()        // Timer is HERE        DispatchQueue.main.asyncAfter(deadline: .now() + 5)             self.startHost(at: (index + 1) % 3)            

【讨论】:

以上是关于WIN7任务栏每隔几十秒就会有一个相机和齿轮状标志的图标闪过导致游戏画面最小化,怎么回事?的主要内容,如果未能解决你的问题,请参考以下文章