Welcome to The Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads

Borderless Windows for Source Games Tutorial


Angel
 Share

Recommended Posts

Borderless Windows for Source Games Tutorial

 

Hey HG, I found out how to run Source games in Window Mode without the borders a few days ago, so here's a tutorial on how to do that for those of you that are interested.

What we'll be doing is creating a script that sets the Source game's window to 0 basically.

 

If you want to set your Source game's window to a resolution of 1920x1080, then download this script; it's what I made and use so it's already been compiled to run as an executable file: download. Extract it from the .zip, copy it to the directory that you want and double click on the executable to run it. Then open your source game. Make sure your Source game resolution is set to 1920x1080 and is running in Windowed Mode.

 

To make your own script for a different resolution and a more in-depth tutorial, start here. I'll be using CS:S as an example in my tutorial:

 

1) Choosing your resolution:

 

1. Open CS:S.

2. On the left click on Options from the menu.

3. Click on the Video tab, 4th tab from the right.

4. Under the option Display, click on the drop down arrow and select run in a window.

5. Under the option Resolution, choose whatever resolution you want. If you want your your Source game to run at it's native resolution (max), choose the highest resolution.

6. Click on the buttons Apply and OK.

7. Exit CS:S.

Screenshot

 

2) Creating your script:

 

1. We'll be using a program called AutoHotkey. Here's the installer for the program that I used: download. Or you can go to their site here.

2. Extract the installer to the directory that you want and then double click on it to begin the installation. Follow the prompts.

3. Once it's installed open up a Notepad document. Start>All Programs>Accessories>Notepad. Or you can just search Notepad from the Start Menu and hit enter.

4. Copy this code into the Notepad document:

Loop
{
WinWait, ahk_class Valve001
IfWinExist
{
	WinSet, Style, -0xC00000 ; remove the titlebar and border(s)
	WinMove, , , 0, 0, [b][u]1920[/u][/b], [b][u]1080[/u][/b] ; move the window to 0,0 and reize it to 1920x1080
}	
Sleep 1000 ; 1 Second
}
return

5. See that bolded/underlined numbers? That's your resolution. The first one is Height, the second is Width. Change those values to the values that you set your resolution to in your Source game.

6. Once that's all done press ctrl+s to bring up the Save As prompt.

7. Under Save as type, click the drop down arrow and select All Files. Under File name, choose what you want the script to be called followed by the file type extension .ahk. Choose the directory that you want to save the script to then click the Save button.

8. Goto the directory that you saved your script to then right click on it and select the option Compile Script. You have just compiled your script into an executable file that can be run without the AutoHotkey program. Feel free to uninstall that now.

Screenshot

 

3) Running your Source game in Borderless Window Mode.

 

1. Double click on the executable script that you just made. It will pop-up in the bottom-right in your taskbar. The icon will be a H in a green box. Your script is now running.

2. Open your Source game.

3. Done :)

Screenshot

 

Adding your script to run on computer startup:

 

1. Right click on you script that you created and click the Copy option.

2. Click on Start>All Programs>Startup then right click on the Startup folder and select the option Open.

3. Right click anywhere inside the Startup folder and select the option Paste.

4. Your script will now run on computer startup.

 

If you don't want to run your Source game/s in Borderless Windows anymore:

 

1. Right click on the script icon on the bottom-right corner and select Exit.

2. Open up your Source game, then click on Options, Video tab and set your Source game to run in Fullscreen again.

3. Apply, OK and Exit Source game.

 

 

Benefits of running your Source games in Window Mode without the border:

 

-Increased fps (frames per second); I went from a solid 60 in CS:S to 130+ fps!

-Minimizing and alt-tabbing to other windows/applications is quick and easy; no lag or freezing/hanging of your Source game!

-Uses up very very little amount of CPU and RAM.

-You won't even notice that your Source game is running in a window if you have set you resolution to it's native aspect ratio, it's just like playing in Fullscreen Mode!

 

 

IMPORTANT:

 

-MUST have set Run in a window in your Source game/s.

-MUST have same resolutions in both your Source game/s and script.

...otherwise you could experience glitches or the not working of Borderless Source games; glitching applies to not setting the same resolutions.

-Source games that are run at Fullscreen Mode while the script is running WILL STILL WORK. Example:

--Script is running, CS:S is set at same resolution as script is is running on Windowed Mode fine. Script is still running and you open Gmod which is running on Fullscreen Mode at whatever resolution, Gmod will still play fine.

 

NOTE:

 

-This is not a cheat and will never be detected as a cheat or get you banned.

-No temporary or permanent changes will be made to ANY of your Source game files.

 

Tested by me and works on:

 

-Counter-Strike: Source

-Garry's Mod

-Team Fortress 2

Day of Defeat: Source

-Portal

-Portal 2 (already has the Windowed Mode no border option, smart thinking lol)

-Left 4 Dead (already has the Windowed Mode no border option, smart thinking lol).

-Left 4 Dead 2 (already has the Windowed Mode no border option, smart thinking lol).

 

If you have trouble following any of my instructions or the script isn't working, feel free to post in this thread or PM me :)

Edited by Angel Descends
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share