如何最大化跨多个显示器的窗口? [英] How can I maximize a window across multiple monitors?
问题描述
使用 AutoHotkey,如何绑定热键以在多个显示器上拉伸/最大化/跨越一个窗口,使其覆盖两个显示器?
Using AutoHotkey, How can I bind a hotkey to stretch/maximize/span a window across multiple monitors so that it covers both displays?
现在,我必须通过用鼠标手动拉伸窗口来做到这一点.我知道有专门的工具可以做到这一点,但我已经在运行 AutoHotkey 脚本,并且宁愿限制我继续运行的工具数量.
Right now, I have to do this by manually stretching the windows with the mouse. I know there are dedicated tools that do this, but I'm already running an AutoHotkey script and would rather limit the number of tools I keep running.
推荐答案
这是我的做法,映射 Shift + Windows + Up
组合以在所有显示器上最大化窗口.这是对 Windows 7 的 Windows + Up
热键的补充,它可以最大化所选窗口.
Here's how I did it, mapping the Shift + Windows + Up
combination to maximize a window across all displays. This compliments Windows 7's Windows + Up
hotkey, which maximizes the selected window.
+#Up::
WinGetActiveTitle, Title
WinRestore, %Title%
SysGet, X1, 76
SysGet, Y1, 77
SysGet, Width, 78
SysGet, Height, 79
WinMove, %Title%,, X1, Y1, Width, Height
return
AHK v2
+#Up::
{
Title := WinGetTitle("A")
WinRestore(Title)
X1 := SysGet(76)
Y1 := SysGet(77)
Width := SysGet(78)
Height := SysGet(79)
WinMove(X1, Y1, Width, Height, Title)
}
这篇关于如何最大化跨多个显示器的窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!