VB.NET阻止AppCursor即使在多线程时也显示
我正在尝试编程一个windows服务,用于监视进程是否正在运行 我使用Threading.Timer每秒检查一次进程。然而,如果我这样做,每次检查进程时,我都会得到一个恼人的AppStarting光标VB.NET阻止AppCursor即使在多线程时也显示,vb.net,multithreading,Vb.net,Multithreading,我正在尝试编程一个windows服务,用于监视进程是否正在运行 我使用Threading.Timer每秒检查一次进程。然而,如果我这样做,每次检查进程时,我都会得到一个恼人的AppStarting光标 For Each p As Process In Process.GetProcesses If p.MainWindowTitle = String.Empty = False Then If p.ProcessName = "MyApp2Moni
For Each p As Process In Process.GetProcesses
If p.MainWindowTitle = String.Empty = False Then
If p.ProcessName = "MyApp2Monitor" Then
WriteToFile("C:\log.txt","app started")
Exit For
End If
End If
Next
我还尝试了backgrounder和其他多线程变体。一切都会重复,但恼人的光标每秒都会出现
我如何摆脱应用程序?我是否可以禁止进程列表例程触发可能触发AppStarting游标的繁忙系统事件?
谢谢嗯,代码和问题都没有任何意义。不要在服务中显示消息框。只是一个可读性想法:与其这样做,不如这样写:如果p.MainWindowTitle=String.Empty=False,那么为什么不写这个:如果p.MainWindowTitle String.Empty,那么