Sar*_*els 24 windows windows-7 keyboard-shortcuts
我发现 Win-left 箭头和 Win-right 箭头在 Windows 7 中非常有用,可以使窗口分别占据屏幕左侧或右侧的 50%。但是,是否有任何命令可以使窗口占据屏幕的 50% 并居中?即使它不调整窗口的大小,是否有键盘快捷键可以使窗口垂直和水平居中?谢谢。
小智 18
这并不完全是为了居中,但可以让您轻松地左右(以及上下)移动窗口。
wbe*_*d52 14
Windows+箭头键在这里非常有用。
(Windows)+← (Left)
和
+→ (Right)
循环向左或向右移动 50% 的屏幕,并将窗口恢复到其原始大小和位置。
+↑ (Up)最大化窗口。
+↓ (Down)
如果窗口最大化,则恢复窗口,否则将其最小化。我建议使用AutoHotkey。
在另一个问题的回答中已经提供了一个完全按照您的要求执行的示例脚本。
这是脚本的代码:
#!Up::CenterActiveWindow() ; if win+alt+? is pressed
CenterActiveWindow()
{
; Get the window handle from de active window.
winHandle := WinExist("A")
VarSetCapacity(monitorInfo, 40)
NumPut(40, monitorInfo)
; Get the current monitor from the active window handle.
monitorHandle := DllCall("MonitorFromWindow", "uint", winHandle, "uint", 0x2)
DllCall("GetMonitorInfo", "uint", monitorHandle, "uint", &monitorInfo)
; Get WorkArea bounding coordinates of the current monitor.
A_Left := NumGet(monitorInfo, 20, "Int")
A_Top := NumGet(monitorInfo, 24, "Int")
A_Right := NumGet(monitorInfo, 28, "Int")
A_Bottom := NumGet(monitorInfo, 32, "Int")
; Calculate window coordinates.
winW := (A_Right - A_Left) * 0.5 ; Change the factor here to your desired width.
winH := A_Bottom
winX := A_Left + (winW / 2)
winY := A_Top
WinMove, A,, winX, winY, winW, winH
}
Run Code Online (Sandbox Code Playgroud)
我做了一个轻微的调整,使窗口底部不会位于任务栏下方,并将其windowWidth从 0.7更改为 0.5。
编辑:现在使用多个监视器,并使用工作区作为顶部和底部值。
附带说明一下,WinSplit Revolution 已停产,取而代之的是一款名为 MaxTo 的付费应用程序。
除了非常强大并涵盖更多用例之外,AutoHotkey 还是免费和开源的。
| 归档时间: |
|
| 查看次数: |
82405 次 |
| 最近记录: |