且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在C#Windows窗体中使用ID创建自己的进程

更新时间:2023-02-11 09:51:37

启动流程时无法指定流程ID - 它由系统分配,而不是您的app。



但是当你从应用程序中启动EXE时,你可以使用Process类。 Process类通过 Id属性 [ ^ ]
You can't specify a process id when you start a process - it is assigned by the system, not your app.

But when you start an EXE running from within your application, you do so using the Process class. And the Process class gives you the Process Id of the running application via the Id Property[^]