将外部 EXE 设置为 TopMost [英] Set an external EXE as TopMost

查看:57
本文介绍了将外部 EXE 设置为 TopMost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您将如何使用 Process.Start 或类似方法将程序设置为最顶层的应用程序

How would you set a program to become the topmost application using Process.Start or something along those lines

任何帮助将不胜感激!

推荐答案

启动过程后,我将首先获取该进程的窗口句柄

After starting the proccess, I would start by getting the window handle of that process

然后,我会使用 SetWindowPos 将其设置为 topmost

Then, I would use SetWindowPos to set it to be the topmost

请注意,这需要使用 PInvoke.这 3 个链接应该指向正确的方向.

Notice that this requires using PInvoke. The 3 links should point you in the right direction.

这篇关于将外部 EXE 设置为 TopMost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆