Last active
December 31, 2015 11:49
-
-
Save petermac-/7981898 to your computer and use it in GitHub Desktop.
VMWareBorderless.ahk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ;Recommended for performance and compatibility with future AutoHotkey releases. | |
#Warn ;Recommended for catching common errors. | |
Process, Priority,, High | |
SetBatchLines, -1 ;Have the script run at maximum speed | |
/* | |
This script forces VMWare Workstation into a fake full screen mode across two monitors (will only work if the guest OS auto-fits to the window). | |
For my setup the left edge of the VMWare window is placed at -1922px. | |
I wanted the window to span from my left monitor to my center monitor both of which are 1080p. | |
The extra 2px to the left is to move the left window border completely out of view. | |
Run VMWare Workstation in windowed mode and hide all panes from view before running this script. | |
*/ | |
WinGetPos,,, winWidth, winHeight, ahk_class VMUIFrame | |
if(winWidth != 3844 or winHeight != 1118) | |
{ | |
WinSet, Style, -0xC00000, ahk_class VMUIFrame ;hide title bar | |
WinSet, Style, -0x800000, ahk_class VMUIFrame ;hide thin-line border | |
WinSet, Style, -0x400000, ahk_class VMUIFrame ;hide dialog frame | |
WinSet, Style, -0x40000, ahk_class VMUIFrame ;hide thickframe/sizebox | |
Gui +LastFound | |
hwnd := WinExist("ahk_class VMUIFrame") ;get handle | |
DllCall("SetWindowPos" | |
, "UInt", hWnd ;handle | |
, "UInt", 0 ;HWND_TOP | |
, "Int", -1922 ;x | |
, "Int", -36 ;y | |
, "Int", 3844 ;width | |
, "Int", 1118 ;height | |
, "UInt", 0x0400) | |
WinSet, Region, 0-0 3842-0 3842-1116 0-1116 0-0, ahk_class VMUIFrame | |
} | |
ExitApp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment