如何知道我的winform是否在c#中的其他窗口之上?

时间:2021-04-12 15:01:02

I need to know if a specific window in my application is on top of all the other windows (including other applications). I tried the TopLevel property but it tells if it is Toplevel within my application only, I would need to know related to other applications also. How can it be done, preferring not using windows API?

我需要知道我的应用程序中的特定窗口是否位于所有其他窗口(包括其他应用程序)之上。我尝试了TopLevel属性,但它告诉我是否只在我的应用程序中使用Toplevel,我还需要知道与其他应用程序有关。怎么做,更喜欢不使用Windows API?

1 个解决方案

#1


Maybe this will help from MSDN GetTopWindow

也许这将有助于MSDN GetTopWindow

#1


Maybe this will help from MSDN GetTopWindow

也许这将有助于MSDN GetTopWindow