Here's a post I made to another forum on this topic. Maybe it will help you out.
What's this about?
Since Half-Life 1, Valve's games have all had a real problem with alt-tabbing out or back into the game. When you alt-tab back into the game, it may take up to a minute for the game to come back up, and often it doesn't even manage to come back at all. This issue especially affects those of us who use Teamspeak while we're playing.
After suffering with this extremely annoying issue for years, I have finally found a solution that works really well and defeats the alt-tab problem entirely.
In short, the solution is to run the game in
borderless windowed mode.
But wait...
Now I can hear your complaint already -- you have tried running in windowed mode and it absolutely kills your framerates. My solution DOES NOT suffer from this framerate penalty.
Let me explain. When you run a Steam game in "normal" windowed mode, Windows puts a frame around your game window with the window's title bar showing. This bordered effect is what causes the severe penalty to framerates. (It's also ugly to look at compared to fullscreen mode).
By running the game in
borderless windowed mode, this framerate penalty is basically eliminated (on my box I see at most a 1-3 fps drop in borderless windowed vs fullscreen mode). Furthermore, in borderless windowed mode, your game will still
look like it is running in the normal full screen mode.
I hope I have convinced you to give this method a try. It has made my gaming experience much more pleasant. I can now alt-tab in and out of the game without issues, and even have other windows temporarily on top of my gaming window without any serious issues (the game does run at a lower framerate with other windows on top of it). The alt-tab delay is entirely eliminated.
OK, so how do I do it?
Firstly, this method will work well ONLY if your desktop screen resolution is
the same as your in-game screen resolution. If you run the game at a lower resolution than your normal desktop, this method is not for you (unless you want to change your desktop resolution to match the game's only when the game is running -- a topic for another post).
If your screen resolutions are the same, then here's how to get your game running in borderless windowed mode:
- 1. Launch Steam and go to the My Games panel.
2. Right click the game you want to change modes for and click Properties.
3. Click the "Set launch options" button.
4. Type the following into the box: -windowed -noborder
5. Hit OK, then Close.
6. Launch the game!
Now when you launch the game, it will still LOOK LIKE the game is in fullscreen mode. To verify that you are actually in borderless windowed mode, join a server and get in the game, then alt-tab out of the game and back in. If things worked correctly, you will see NO delay in alt-tabbing back into the game. You can also try dragging other non-maximized windows on top of the game window to prove it to yourself.
Why does this work?
You might be wondering why windowed mode does not suffer from the same alt-tab issue that fullscreen mode has. Basically, in fullscreen mode, when you alt-tab out of the game, the game engine unloads all of its graphic resources from memory. Consequently, when you alt-tab back in, the game is forced to reload all those graphics back into (computer AND videocard) memory.
In contrast, with windowed mode, when you alt-tab out of the game, the game engine keeps everything loaded in your system's memory -- after all, the game is running in a window and Windows might be asked to show part or all of this window at any time.
You'd think Valve might have picked up on this fact and used the exact same behavior for their fullscreen mode. But no.
And as previously mentioned, the borderless mode is essential for getting the same framerates from the game that you get from using fullscreen mode. Apparently, when the game window's "contents" completely fill your monitor's screen space, the framerate hit goes away. Similar options can be used in other games like WoW to the same effect.
This method should work with at least the following Steam-based games: Team Fortress 2, DOD:S, CS:S, and Garry's Mod. I suspect the "-noborder" option is supported by most of their other games as well. Note that you'll have to set the launch options for each game that you want to have running in this mode.
Cheers
joelpt