C / C ++ / C#强制窗口在顶部 [英] C/C++/C# Force window to be on top

查看:227
本文介绍了C / C ++ / C#强制窗口在顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法强制 另一个 窗口位于顶部? 不是应用程序的窗口,而是已经在系统上运行的另一个。 (Windows,C / C ++ / C#)

Is the there a way to force another window to be on top? Not the application's window, but another one, already running on the system. (Windows, C/C++/C#)

推荐答案

您可以使用Win32 API BringWindowToTop 。它需要一个HWND。

You can use the Win32 API BringWindowToTop. It takes an HWND.

您也可以使用Win32 API SetWindowPos ,它也允许你做一些事情,例如使窗口成为顶层窗口。

You could also use the Win32 API SetWindowPos which also allows you to do things like make the window a top-level window.

这篇关于C / C ++ / C#强制窗口在顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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