Windows program to remove titlebar, frame, etc from a window?

I like playing computer games in windowed mode, as opposed to full screen. I don't like staring at the title bar, frame, and other UI junk. I also don't like seeing other stuff on my desktop around the window. Is there a simple Windows program that will strip the UI chrome off of an arbitrary window from some other application? Extra points for an easy way to put a black screen underneath the window, hiding the desktop.

Note: I'm looking specifically to handle windows that are smaller than my desktop size. There's a variety of 'windowed maximized' options that make a window exactly the desktop size, and positioned so all the UI decorations are off screen. (E.g.: ShiftWindow). I'm trying to strip all the decorations away from a window that's smaller than desktop size.


Solution 1:

Just something small that I made for my purposes after reading voodoomsr's comment. Makes it to go left up corner and resizes to my full resolution. Restores as it was before. Can't be used with multiple apps same time.

Thanks voodoomsr

;-Caption
LWIN & LButton::
SetTitleMatchMode, 2
WinGetPos, X, Y, Width, Height, A
WinSet, Style, -0xC00000, A
WinMove,A,,0,0,1920,1080
return
;

;+Caption
LWIN & RButton::
WinSet, Style, +0xC00000, A
WinMove,A,,%X%,%Y%,%Width%,%Height%
Sleep, 1000
Sleep, 1000
return
;

EDIT:

TBH I tried to find something useful for windows that doesn't resize but couldn't find anything (not saying that it's not possible, this was actually my first Autohotkey script).

Well anyhow I made some tweaks like removing unnecessary sleeps, using style that Nelson suggested and making it work with only one button so double-clicking won't override saved variables.

#SingleInstance force

; Exclude the desktop
; Note: Also excludes "My Computer" browsing windows.
;       Better detection might be needed to differentiate the parent explorer "ahk_id" from child windows.
;       Also seems to disregard accidental Metro interface clicks (Win 8+)
#IfWinNotActive ahk_exe explorer.exe

; Set your resolution (minus decorations like start bars if you wish to leave those on-screen.
w = 1920
h = 1080
w_wasted = 6 ; width used by resize bars
h_wasted = 29 ; width used by caption frame and resize bars

; Window to fullscreen
LWIN & LButton::
  SetTitleMatchMode, 2
  WinGet Style, Style, A

  ; 0xC40000 = WS_BORDER (0x800000) + WS_DLGFRAME (0x400000) + WS_SIZEBOX aka WS_THICKFRAME (0x040000)
  if(Style & 0xC00000) { ; if has WS_CAPTION. Ignore sizebox value.
    WinGetPos, X, Y, Width, Height, A
    WinSet, Style, -0xC40000, A ; removes attributes, including sizebox...doesn't do a strict subtraction
    WinMove,A,,0,0,w,h
  } else {
    WinSet, Style, +0xC40000, A
    ; Note: will set WS_SIZEBOX even if not previously present
    if(Width > w - w_wasted) { 
      Width := %w%-%w_wasted%
    }
    if(Height > h - h_wasted) {
      Height := %h%-%h_wasted%
    }
    WinMove,A,,%X%,%Y%,%Width%,%Height%
  }
  WinSet Redraw
  Return

Solution 2:

just use this autohotkey script:

;-Caption
LWIN & LButton::
WinSet, Style, -0xC00000, A
return
;

;+Caption
LWIN & RButton::
WinSet, Style, +0xC00000, A
return
;

you could download autohotkey from here http://www.autohotkey.com/download/. Save the file with a extension .ahk and run it like any application.

Usage:

to remove the title bar LWindowButton + Left click

to restore the title bar LWindowButton + Right click

Solution 3:

here is a programm that can remove the titlebar for any window. To do that you must select games window in WinExplorer tree view than switch to 'Style' tab and check off WS_DLGFRAME.

Solution 4:

Using AutoHotKey and an auto-hide taskbar.

LWin & f::

WinGet Style, Style, A
if(Style & 0xC40000) {
  WinSet, Style, -0xC40000, A
  WinMaximize, A 

} else {
  WinSet, Style, +0xC40000, A
  WinRestore, A
}
return

Why use WinMaxmize? See comments of Asd's answer.

Solution 5:

CutAway by Skrommel might do what you want.

Cut Away