PDA

View Full Version : -noborder for Counter strike source


Hosain H
03-24-2009, 11:44 AM
Does anyone here have it working? How did you get it working?

It's not working for me :<

Smarties^
03-24-2009, 12:12 PM
I think it only works for orangebox games.

Hosain H
03-26-2009, 03:09 PM
So no fix? :(

Salith
03-26-2009, 03:14 PM
Not unless they bother to upgrade the engine, which is another thread altogether.

syserr0r
08-11-2009, 06:41 PM
Old thread I know, but will hopefully be useful to some people (like me with dual-monitors)


Home Made Version: (any screen resolution - you made it yourself so you know its safe/no virus in it)

1. Install AutoHotKeys from http://www.autohotkey.com/
2. Create a new hotkey script with the following in it:
Loop
{
WinWait, ahk_class Valve001
IfWinExist
{
WinSet, Style, -0xC00000 ; remove the titlebar and border(s)
WinMove, , , 0, 0, 1280, 1024 ; move the window to 0,0 and reize it to 1280x1024
}
Sleep 1000 ; 1 Second
}
return
3. [OPTIONAL] Replace the 1280 and 1024 values in with your screen height/width (e.g. 1024,768 800,600 etc.)
4. [OPTIONAL] Right click the .ahk file you make and click "compile" to turn it into an exe for ease of use
5. Run your exe/ahk file

~ OR ~

Download ready-made version: (Dont have to install autohotkeys, you trust me, you only want 1280x1024)
www.syserror.co.uk/HLwin.exe - This version is *ONLY* for 1280x1024

End Result:
+ You will have a green icon with an 'H' in it on your taskbar
+ You can right click this icon to close it.
+ This script will "-noborder" all hl1/h2 games and mods!
+ This script does not make any permanent changes to the game.
+ Simply close the script and restart your game and it will be back to normal!
+ This is not a cheat and will never be detected as a cheat or get you banned.
+ Your hl1/hl2 games need to be run in windowed mode at the screen resolution that you put in this .ahk script! (1280x1024 in my case).


Tested & Works On:
Counter-Strike: Source
Natural-Selection
Team-Fortress 2
Left4Dead
Day of Defeat: Source
The Ship (Yes I bought it, go figure)
Portal
Half-Life: Source
Okay.. I can't be arsed to test the rest of my hl1/hl2 games - it works mkay?

Tested & Ignores (correctly):
Crysis (Steam Version)
Elf Bowling: Hawaiian Vacation (Steam Version - Don't ask...)
Call of Duty 4: Modern Warfare
Okay.. I can't be arsed to test the rest of my non-hl1/hl2 games - it doesn't break them, mkay?


Bugs:
~ If the game/mod is not running at the same resolution as this script you may get weird resizing/UI issues.
~ If you run the game on a secondary monitor it will get moved back to 0,0 after a second. (Alter the coordinates of WinMove 0,0 if you are feeling brave)

Last minute thought: This may try to do resizing on SDK tools/Hammer Editor - Just close the script if this is the case


Advanced notes:
- It runs all the time, although it doesn't need to. It doesn't do much however (as you can see) - it uses no CPU.
- It is constantly checking for a hl1/hl2 game, if it finds one it just removes its border/titlebar, resizes it to the correct resolution since it is a smaller window (no titlebar/borders) and sticks it in the absolute top left of the screen (0,0). This is basically what -noborder does. If it doesn't find a hl1/hl2 game it skips this. It then sleeps for a second (so that its not checking every processor cycle, no need), rinse repeat.
- From what I can tell all hl1/hl2 based games have a window class name of "Valve001" so this should pick up all hl1/hl2 games including mods.

syserr0r
08-11-2009, 07:30 PM
Update 12/08/2009 3:30 AM (Colds ftl)

Todo:
+ Guess the correct screen resolution from the nearest neighbour
+ Accept screen resolution arguments from the command line to allow for a generic exe/ahk
+ Implement a GUI for settings the screen resolution (?)
+ Save settings to file (.ini?)

unconnected
10-25-2009, 05:13 AM
Thanks Syserror, works like a charm! Now i have it running at all times because starting it everytime im playing is something i forget.. Do you think that it does any hog at all?


Cheers

syserr0r
10-25-2009, 06:52 AM
I've got 2, 1 for CoD4 and the above one, running at all times and from what I can tell it doesn't have any CPU usage (which is why I run them all the time, like you I can't be bothered to keep starting them)

On a side note, this is the Call of Duty:Modern Warare (CoD4) version:

Loop
{
WinWait, ahk_class CoD4
IfWinExist
{
WinSet, Style, -0xC00000 ; remove the titlebar and border(s)
WinMove, , , 0, 0, 1280, 1024 ; move the window to 0,0 and reize it to 1280x1024
}
Sleep 1000 ; 1 Second
}
return

Again where 1280 and 1024 is the screen resolution.

There is 1 extra thing to get it working with CoD4 however, since there is no option to change between windowed and full-screen mode you have to enter a couple of console commands.

Enter the following commands (one per line, press enter after each one) into the CoD4 console to set it to windowed mode (to work in this "borderless" mode):

/r_fullscreen 0
/vid_restart

If you wish to go back to fullscreen then simply:

/r_fullscreen 1
/vid_restart

Hope this is useful to someone :)

unconnected
10-25-2009, 12:55 PM
Yeah i made a COD4 my self :P WindowSpy helped..

Thanks bud

Fireye
10-30-2009, 10:36 AM
Awesome post dude, my poor dual-monitor self has been looking for just this kind of solution!

Gentle
11-03-2009, 02:48 PM
Can someone post a description of what "-noborder" does and also post links to screenshots showing what the "before" and "after" looks like with this program?

Gentle

PLAY_MAKER
11-03-2009, 03:29 PM
Nice little program this should help out a great deal for people with dual monitors.

Soberwarlock
11-16-2009, 04:52 AM
1. Install AutoHotKeys from http://www.autohotkey.com/
2. Create a new hotkey script with the following in it:
Loop
{
WinWait, ahk_class Valve001
IfWinExist
{
WinSet, Style, -0xC00000 ; remove the titlebar and border(s)
WinMove, , , 0, 0, 1280, 1024 ; move the window to 0,0 and reize it to 1280x1024
}
Sleep 1000 ; 1 Second
}
return
3. [OPTIONAL] Replace the 1280 and 1024 values in with your screen height/width (e.g. 1024,768 800,600 etc.)
4. [OPTIONAL] Right click the .ahk file you make and click "compile" to turn it into an exe for ease of use
5. Run your exe/ahk file
[/SIZE]

Cool man that helped. Is there a way I can use scripts for non-steam games like GTA4, Crysis (DVD), Starcraft:confused:

Fireye
11-16-2009, 09:59 AM
Can someone post a description of what "-noborder" does and also post links to screenshots showing what the "before" and "after" looks like with this program?

Gentle

NoBorder on newer Source games (TF2, L4D, Portal, etc) gives you windowed fullscreen. In effect, if you have two monitors, you can go between a web browser and the game easily.

If you run fullscreen, when you try to go outside of the game, it will minimize the game, which takes time.

KiloSwiss
11-17-2009, 08:31 AM
Hello I took Your idea and made these Scripts for the following most used Resolutions.

800x600
1024x768
1152x864
1280x960
1280x1024
1440x900
1600x900
1680x1050
1920x1200

You can Download them all together packed in a little Zip-file from my Webspace: http://www.kiloswiss.ch/downloads/CSS_Noborder.zip (1.92MB)

btw.
It would be nice if someone could make a Readme on English, because My English isn't very good :)
I will then put it also in the Zip-file and reupload it on my Webspace.

I can also add some more Resolutions if You People like, just tell me which resolutions You also use often on Your Computers.

Have Fun
Greez KiloSwiss

|edit|
added 1920x1200.exe to the Zip-file

MisterTece
11-17-2009, 11:57 PM
what is noborder anyways?

KiloSwiss
11-18-2009, 08:53 AM
Watch the Pictures (1024x768)

» Normal windowed CS:Source (http://www.kiloswiss.ch/downloads/CSS_windowed_normal.jpg)

» CS:Source with Noborder (http://www.kiloswiss.ch/downloads/CSS_windowed_noborder.jpg)

It's simply just no Frame around the Window, like a fullscreen application.

kimlo
11-19-2009, 10:18 AM
Watch the Pictures (1024x768)

» Normal windowed CS:Source (http://www.kiloswiss.ch/downloads/CSS_windowed_normal.jpg)

» CS:Source with Noborder (http://www.kiloswiss.ch/downloads/CSS_windowed_noborder.jpg)

It's simply just no Frame around the Window, like a fullscreen application.

Hey mate,

Any chance you can do a 1920x1200 script? I run all games I can in noborder mode and would love to run CSS in noborder mode.

Thanks in advance.

KiloSwiss
11-19-2009, 11:18 AM
I addet a 1920x1200.exe for this resolution to the Zip-file.
http://www.kiloswiss.ch/downloads/CSS_Noborder.zip

btw.
I'm still looking for someone to translate my German readme into english

Have Fun
KiloSwiss

kimlo
11-24-2009, 12:25 AM
I addet a 1920x1200.exe for this resolution to the Zip-file.
http://www.kiloswiss.ch/downloads/CSS_Noborder.zip

btw.
I'm still looking for someone to translate my German readme into english

Have Fun
KiloSwiss

Hey mate thanks, really appreciate it!
It's a pain trying to find my recently made posts, wish there was a feature for that!

I'll try it out and tell you how I go.

kimlo
11-24-2009, 12:40 AM
Hey thanks again, works like a charm!
I'm very happy I can now run CSS in no border mode I hate full screen now that I'm used to L4D2/TF2 running in no border.

syserr0r
12-25-2009, 05:42 AM
Woah, I'm surprised how much attention this has gotten; always figured I was the only one this really applied to, good to see I am helping other people :)

I might see if I can make some improvements to this (such as having 1 file for all screen resolutions) and possibly working for more games (such as Crysis etc.)

Just to answer a couple of questions:

-noborder
This setting runs the game in windowed-maximized mode.

Normally when you have a game it runs in full-screen mode which takes over control of the screen, so when you alt-tab the game minimizes (which can take a few seconds) and again when you go back to the game it takes a few seconds to come back.

If you run a game in windowed mode and you alt-tab it is (near) instant, and the game is left showing on your desktop. i.e. if I play cs windowed mode and then alt tab too msn, I will have msn on top of the game, and the game still running in the background (and I can still see what's going on in the game)

The benifit of windowed mode is that you can switch to msn/irc/whatever without delay and still play the game (and see whats going on).

-noborder or (as WoW calls it) "windowed maximized" is the best of both worlds; you get your windowed game, but it fills the screen and hasn't got the blue windows border, so it looks like it is full-screen, however if you alt-tab you can still see the game (it doesn't minimize, its in the background) and its instant switching back and forth

I will upload a video to explain this better when I get a chance, its kinda hard to explain on text :P

Soberwarlock
12-28-2009, 04:22 PM
I will upload a video to explain this better when I get a chance, its kinda hard to explain on text :P

Can you post here when you do have the video/downloads available ;)

Darth Android
01-24-2010, 03:16 PM
I made some modifications to this script for my own benefit, and thought i'd repost them here for everyone:

Loop
{
SysGet MonPrim,Monitor
SysGet MonWidth,0
SysGet MonHeight,1
IfWinActive, Sins of a Solar Empire
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}
IfWinActive, ahk_class ArenaNet_Dx_Window_Class
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}
IfWinActive, ahk_class Wolf2
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}
IfWinActive, ahk_class CoD4
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}
IfWinActive, ahk_class Valve001
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}

IfWinActive, Need for Speed™ SHIFT
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}
Sleep 1000 ; 1 Second
}
return


What's different:
+Screen Size is automatically detected. Games will be moved and sized to your primary monitor (the one with window's taskbar) if you have more than one monitor.
+Added a few more games, and made it a simple copy/paste to add additional games. You only need to have one script running for all games. (And games can be removed if you don't want the script to mess with that game)
+Fixed the window style for games that have a maximize/minimize button on their windows (before, a thin border was left for these buttons, even though there was no title/caption)

Soberwarlock
01-27-2010, 07:52 PM
I made some modifications to this script for my own benefit, and thought i'd repost them here for everyone:

Loop
{
SysGet MonPrim,Monitor
SysGet MonWidth,0
SysGet MonHeight,1
IfWinActive, Sins of a Solar Empire
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}
IfWinActive, ahk_class ArenaNet_Dx_Window_Class
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}
IfWinActive, ahk_class Wolf2
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}
IfWinActive, ahk_class CoD4
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}
IfWinActive, ahk_class Valve001
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}

IfWinActive, Need for Speed™ SHIFT
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}
Sleep 1000 ; 1 Second
}
return


What's different:
+Screen Size is automatically detected. Games will be moved and sized to your primary monitor (the one with window's taskbar) if you have more than one monitor.
+Added a few more games, and made it a simple copy/paste to add additional games. You only need to have one script running for all games. (And games can be removed if you don't want the script to mess with that game)
+Fixed the window style for games that have a maximize/minimize button on their windows (before, a thin border was left for these buttons, even though there was no title/caption)

How do you set up a script using different games :confused: I want to make one for Killing Floor, GTA 4 (DVD), Battlefield 2 (DVD), and other games that are retail version or off from steam.

lanux128
01-27-2010, 09:09 PM
Old thread I know, but will hopefully be useful to some people (like me with dual-monitors)

@syserr0r: try this modified code, it should work with all resolutions since "A_ScreenWidth" and "A_ScreenHeight" gets the monitor dimension.

Loop
{
WinWait, ahk_class Valve001
IfWinExist
{
WinSet, Style, -0xC00000 ; remove the titlebar and border(s)
;move the window to 0,0 and resize it to the width and height of the primary monitor
WinMove, , , 0, 0, %A_ScreenWidth%, %A_ScreenHeight%
}
Sleep 1000 ; 1 Second
}
Return

P.S. code untested as i'm at work.. ;)

Darth Android
01-28-2010, 12:47 PM
How do you set up a script using different games :confused: I want to make one for Killing Floor, GTA 4 (DVD), Battlefield 2 (DVD), and other games that are retail version or off from steam.

If you're using the script I posted that already contains multiple games:

1. Launch the game in windowed mode
2. Open AHK's Window Spy
3. Click on the window you want to modify
4. Copy the info in Window Spy's "Window Title & Class" section.
5. Pick the line that identifies the window best.
Ex:
This browser window gives me:
Steam Users' Forums - Reply to Topic - Google Chrome
ahk_class Chrome_WindowImpl_0

The first is the webpage title - that's useless here because it changes
The second is the window class - this doesn't change for this window, so that's what we'll use.

Now, copy and paste this block after the last block, but before the Sleep command in the script:
IfWinActive, <<Identifier>>
{
WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
}

Replace <<Identifier>> with the window title or class (including "ahk_class"!) with whichever you decide to use.
Save the script, then reload it.

Why would I ever use the title, if it might change?

The class is often the same for a game engine - all source games share the same class because they all run on source. This is good for grabbing an entire style of games, but sometimes this isn't what we want. For example, if you want to make Half-Life 2 borderless, but not Half-Life: Source, then you have to use window titles. Also, window titles generally stay the same for specific games. The example I gave above is of a web browser, so the title is actually used to relay information to the user and it's probably a bad example. But I'm lazy.

max2
08-22-2010, 11:06 PM
Thanks finally fixed my Left 4 Dead 2 switching windows issue. Now works all the time instead of just some of the time. Hate having to relaunch Left 4 Dead 2 because of it. Three cheers!

bandit8623
08-23-2010, 09:03 AM
last time i tried windowed mode, the game ran like crap. it must be running really well for you guys?

max2
09-15-2010, 01:41 AM
Excellent I just got it working with Call of Duty World at War too! My next game to try it with is Simcity 4 and many others that always give me trouble when minimizing sometimes.

max2
09-18-2010, 01:43 PM
Windowed no border (maximized window) is possible using ShiftWindow, I have a guide up here on Shiny Hacks (http://www.shinyhacks.com/2010/08/how-to-play-any-game-in-windowed.html).

Thanks hopefully this is much easier and better! If not no big deal. At least it is a second option in case the former stops working.

KiloSwiss
09-18-2010, 01:53 PM
Since CSS got Updatet to the OB Engine -noborder works perfectly.
Just start CSS with -noborder go to options -> Graphics and choose windowed and one of the windowed resolutions.

No need for external "tools" since the Update.

max2
09-18-2010, 02:13 PM
Since CSS got Updatet to the OB Engine -noborder works perfectly.
Just start CSS with -noborder go to options -> Graphics and choose windowed and one of the windowed resolutions.

No need for external "tools" since the Update.

Finally!

If it was up to me all games would have the option of windowed borderless mode! Would be so much easier and better for everyone! Why don't they do this ?

Soberwarlock
09-22-2010, 02:16 AM
No need for external "tools" since the Update.

Finally!

Goodness gracious. It's nearly the end of 2010 and only now has Steam added this feature. My God sir.....

KiloSwiss
09-22-2010, 10:27 AM
You know nothing!

Steam is just a plattform and did no changes to CSS.
VALVE/HPE portet CSS to the new OB-engine which provides this feature since it was released in 2007.
And the OB-update for CSS came out in the first half of 2010