Skip to main content

窗口置顶

更改子窗口、弹出窗口或顶级窗口为顶层窗口或者非顶层窗口。

PositionWindow

权限

无要求, 但是对于UWP 应用程序来说,它不符合 Win32 应用程序的窗口规则(据微软官方消息:操作系统中没有任何 API 可以使 UWP应用程序的窗口置顶),因此该动作无效。例如:Win11 的记事本程序。

子流程

不支持

运行参数

  • 窗口

    要设置的窗口

  • 方式

    位置,比如设置为最顶层窗口,

输出

Boolean

脚本调用

import simple;

其它

示例:https://github.com/shelllet/WinUi/blob/main/window/PositionWindow.simple

!> 对于 UWP 应用解决办法参考:https://github.com/microsoft/Xaml-Islands-Samples/blob/master/Samples/Win32/SampleCppApp/ReadMe.md