C# 检查进程状态

发布于 2024-10-31 07:05:43 字数 527 浏览 0 评论 0原文

我正在尝试创建一个程序,该程序应按顺序启动 10 个进程。为此,我需要检查进程状态。

我想知道如何检查此状态。

我知道这个问题以前已经被问过很多次了。但我需要的是检查应用程序是否仍在启动或是否已经在运行。

因为随着时间的推移,随着检索更多数据,我想要启动的程序可能需要更长的时间来加载。所以一个简单的计时器是不够的..

我希望我在这里说得清楚。 (顺便说一句,程序应该无限期运行)。

==编辑==

我正在使用 System.Diagnostics 来启动进程。

我的意思是运行/启动如下。 想象一下加载一个非常大的程序。最初,程序启动的唯一指示是鼠标。这可以称为程序启动。

我所说的程序运行是指当你可以使用它的时候。

Double click .exe => Program Loading => Program ready to use
                  => Starting up     => Running

I'm trying to create a program that should start 10 processes in successive order. In order to do that I need to check for the process status.

I was wondering how i could check for this status.

I know this question has been asked some times before. but what I require is to check whether the application is still starting up or if it's already running.

Because over time the programs i want to start up will probably take longer to load as more data is being retrieved. so a simple Timer would not suffice..

I hope i'm being clear here. (btw the programs are supposed to run for an unlimited amount of time).

==Edit==

What I'm using is System.Diagnostics for the process to start.

What i mean with is running/ starting up is the following.
imagine an very big program loading. initially the only indication you have of the program starting is your mouse. This could be dubbed as the program starting up.

What I mean with the program running is when you can use it.

Double click .exe => Program Loading => Program ready to use
                  => Starting up     => Running

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文