本文介绍了设置窗口的所有者而不激活/带到前面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我一直在谷歌搜索如何设置窗口的所有者而不激活/将所有者带到前面并且无法找到它。目前我正在使用winapi:

Hello, I've been googling for days for how to set window's owner without activating/bringing owner to front and couldn't manage to find it. Currently I'm using winapi:

SetWindowLong(hwndWindow, GWL_HWNDPARENT, hwndOwner); // GWL_HWNDPARENT = -8



或内置包装:


or built in wrap:

new WindowInteropHelper(window) { Owner = owner };



两者都适用于设置所有者,但它们将所有者窗口带到前面,当有很多窗口时会导致问题。



感谢您的帮助!


Both works fine for setting owner, but they are bringing owner window to front which causes problems when there are a lot of windows.

Thanks for help!

推荐答案


这篇关于设置窗口的所有者而不激活/带到前面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-16 11:45