gpt4 book ai didi

c# - 如何使用 .Net 使窗口保持在顶部?

转载 作者:行者123 更新时间:2023-11-30 20:43:50 24 4
gpt4 key购买 nike

有没有办法制作给定的窗口,例如记事本或任何其他窗口保持在顶部?

请注意,这不是关于如何使 FormWPF 窗口保持在顶部的问题。

最佳答案

我会为此使用互操作,

SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);

始终在顶部切换,并且

SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);

停用。

https://github.com/oazabir/AlwaysOnTop 提供

关于c# - 如何使用 .Net 使窗口保持在顶部?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30054697/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com