Feature request: Center a window (I noticed Minimize, Maximize, Restore but not Center).
Is it possible? Sorry in advance if it exists and I didn't notice it.
XMBC Version: 2.18.7
Windows Version: Windows 8.1
Mouse Information (brand/model): Microsoft Bluetooth Mobile Mouse 3600
Relevant Computer Information (CPU, RAM etc): Intel Core i5 Quad Core, 8 GB RAM, 256 GB SSD
"Center a window" action
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Re: "Center a window" action
Its not there (there isn't a Windows API call to do that like there is for min/max etc.) but it should be possible to do something like that.
I presume you are talking about centering it relative to the desktop of the current monitor that the window is on?
I presume you are talking about centering it relative to the desktop of the current monitor that the window is on?
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
Re: "Center a window" action
Yes. I found a AutoHotkey to make it work.
Ctrl+Shift+Home centers a window, Ctrl+Shift+End restores it. Converted it into an EXE
Code: Select all
^+Home::
global windowName
global X
global Y
global begWidth
global begHeight
WinGetTitle, windowName, A
WinGetPos, X, Y, begWidth, begHeight, %windowName%
CenterWindow(windowTitleVariable)
{
WinGetPos,,, Width, Height, %windowTitleVariable%
WinMove, %windowTitleVariable%,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2 )-(Height/2)
}
CenterWindow(windowName)
return
^+End::
WinMove, %windowName%,, X, Y, begWidth, begHeight
return
Re: "Center a window" action
Nice,
I'll still aim to add it natively to XMBC - but good that you have a solution in the meantime.
I'll still aim to add it natively to XMBC - but good that you have a solution in the meantime.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)