为vb.net wmi searhc应用程序创建取消按钮 [英] creating a cancel button for a vb.net wmi searhc application

查看:77
本文介绍了为vb.net wmi searhc应用程序创建取消按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究提取远程信息的应用程序.我遇到的问题是无法对计算机进行ping操作时将其锁定.一旦无法ping通机器以停止搜索,我就需要告诉应用程序.我尝试使用stop,但这会使应用程序不稳定.我还需要一些方法来取消正在运行的wmi搜索.任何帮助都将非常有用.

I have been working on this application that pulls remote information. The issue i m having is when the machine cant be pinged it locks up. I need someway to tell the application once it cant ping the machine to stop the search. I have tried using stop but that makes the application unstable. I also need some way to cancel the wmi search in the middle of it running. Any help would be great.

推荐答案

您是否已尝试使用异步ManagementObjectSearcher.Get方法(ManagementOperationObserver) [ ^ ].

另一件事是,您可以使用 Backgroundworker [
Have you already tried using the asynchronous ManagementObjectSearcher.Get Method (ManagementOperationObserver)[^].

Another thing is that you can use a Backgroundworker[^] to do the search in non-UI thread.


这篇关于为vb.net wmi searhc应用程序创建取消按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆