How does one set Dwarf Fortress to run as a fullscreen window

dwarf-fortress

I've been trying to figure out how to get Dwarf Fortress to run in a fullscreen window (also know as a "borderless window") for a little while now. F11 sets the game to actual fullscreen, but that is not what I'm looking for as it closes when I Alt + Tab.

My AutoHotKey code to resize the window does not work; it sets the window to be far too small (less than 80×80). Just in case you wanted to see my AutoHotKey code, here it is:

^!g::
WinGetTitle, currentWindow, A
IfWinExist %currentWindow%
{
   WinSet, Style, -0xC00000 ; hide title bar
   WinSet, Style, -0x800000 ; hide thin-line border
   WinSet, Style, -0x400000 ; hide dialog frame
   WinSet, Style, -0x40000 ; hide thickframe/sizebox
   WinMove, , , 0, 0, 2560, 1440
}   
return

Press Ctrl + Alt + G and it should set the currently focused window to fullscreen (2560×1440 in my case).

Best Answer

You can adjust the window size via the init.txt file (which is in the data/init subdirectory of your Dwarf Fortress install).

You probably want to find the WINDOWEDX and WINDOWEDY keys and adjust them:

[WINDOWEDX:2560]
[WINDOWEDY:1440]

(This may need tweaking, since I'm not sure if DF uses these numbers for the size of the window or the size of the window's client area; you want the latter).

I don't think there is support in the game for windowed fullscreen otherwise, so hopefully your script does still correctly adjust the window style to eliminate the borders.