How can I make a child process window to appear modal in my process?

前端 未结 6 1810
终归单人心
终归单人心 2021-02-08 23:43

I have an application that calls some other utility application to set some settings for a particular device. That utility application is called using ShellExecuteEx.

So

6条回答
  •  忘掉有多难
    2021-02-09 00:23

    Try this one. This halts the caller until the child process exits.

        private void btnChildApp_Click(object sender, EventArgs e)
        {
            Process p = Process.Start(@".\ChildApp.exe");
            p.WaitForExit();
        }
    

提交回复
热议问题