c# - 启动可执行文件,然后立即暂停它
问题描述
我想询问有关使用 c# 暂停进程的问题。我创建了从用户获取路径(到 exe)的应用程序,但是我需要执行该应用程序,然后尽快将其挂起。
例子:
Try
{
//run the exe
//suspend the process
}
catch
{
// if it fails, then kill the process.
}
另外,它可以等待例如 0.3 秒,然后再次暂停该过程。
解决方案
推荐阅读
- scala - How to get integer value with leading zero in Spark (Scala)
- python - 如何合并两个都包含所需关键字的文本片段?
- javascript - Gulp watch 只检测到第一个变化
- ruby-on-rails - 只渲染一次部分
- java - 关于 System.out.printf 的问题 / 关于输出的问题
- python - 使用欧几里得距离显示图像
- javascript - 为什么我不能使用 npm 安装这个模块?
- html - Flex 容器使我的 div 不会转到下一行
- jquery - 为什么 width:100% 在预输入输入中不起作用?
- reactjs - 如何在带有状态的 React 中渲染视频 html 元素?