PDA

View Full Version : Borderless windowed mode for HoN



foxX
07-03-2011, 09:58 AM
Hi,

I coded this app to create a seamless windowed mode for the game - no borders, no titlebar.

The application works with any program by inserting 2 items in the system menu (available through the small icon in the top left corner of the window or by pressing right click / shift+right click on the Windows Taskbar).

My program requires Admin permissions to change the style of others' windows and to modify the logic of GetWindowRect(). Run it first and it will affect all the programs started after.

To read more details, including the source code, refer to http://elf.cs.pub.ro/so/wiki/laboratoare/resurse/injections.

Changelog:
v5:
-added a list of registered windows through which to set, by use of a checkbox, applications that should be deframed by default
-saves to ini file
-won't provide a static build anymore, remember to get the MFC runtime http://www.microsoft.com/download/en/details.aspx?id=5555
v4:
-protected against starting multiple instances
-runs properly under 32 bit operating systems
-added icon (though a bit rough)
-updated version string in the "about" box
-added a smaller footprint executable for the main app, the no-MFC version (requires the runtime from Microsoft)
-added text to the main window
v3:
-supports 64-bit programs
-performs proper cleanup in the various circumstances i could think of (remove frame of window -> close deframe; remove frame of window -> re-add the frame -> close deframe)
v2:
-supports Starcraft 2
-doesn't cause a crash anymore when quitting while the game is without borders
-doesn't add multiple system menu items anymore for applications that minimize to the notification area
v1:
-initial release


http://i.imgur.com/oCCchl.jpg (http://i.imgur.com/oCCch.jpg)

http://i.imgur.com/6yZwvl.jpg (http://i.imgur.com/6yZwv.jpg)

Download link:
http://elf.cs.pub.ro/so/wiki/_media/laboratoare/resurse/deframe-5-no-mfc.7z
http://www.mediafire.com/?5igcf9tlwp47c1d - temporary download link for the binary until I fix my server and the university server is back



Down for now:
http://141.85.0.93/~foxx/mob/Deframe/Deframe5-no-MFC.7z (http://141.85.0.93/%7Efoxx/mob/Deframe/Deframe4.7z) (needs the Visual Studio 2010 Runtime - http://www.microsoft.com/download/en/details.aspx?id=5555)
Older versions:
http://141.85.0.93/~foxx/mob/Deframe/Deframe4.7z (http://141.85.0.93/%7Efoxx/mob/Deframe/Deframe4.7z)
http://141.85.0.93/~foxx/mob/Deframe/Deframe4-no-MFC.7z (http://141.85.0.93/%7Efoxx/mob/Deframe/Deframe4-no-MFC.7z) (linked dynamically against MFC, way smaller but needs the Visual Studio 2010 Runtime - http://www.microsoft.com/download/en/details.aspx?id=5555)
http://141.85.0.93/~foxx/mob/Deframe/Deframe3.7z (http://141.85.0.93/%7Efoxx/mob/Deframe/Deframe3.7z)
http://141.85.0.93/~foxx/mob/Deframe/Deframe2.7z (http://141.85.0.93/%7Efoxx/mob/Deframe/Deframe2.7z)
http://141.85.0.93/~foxx/mob/Deframe/Deframe.7z (http://141.85.0.93/%7Efoxx/mob/Deframe/Deframe.7z)

Veldt
07-03-2011, 10:07 AM
Works like a charm, been looking for a way to remove borders from windowed
applications and this certainly does just that, great job!

My only gripe is that you cant drag/move the window once youve removed the
borders, but thats something you can do before you remove them in the first place so its really not a problem!

foxX
07-03-2011, 10:26 AM
Shift right click the hon icon in the taskbar and select move from the menu. Then press any arrow key and then just move the mouse. Click when done.

I'll think of some options for the Deframe window (it currently does nothing), like configuring alt+click for dragging or something (xorg style).

MetaBrain
07-03-2011, 11:20 AM
Bug.n is a tiling windows manager for Windows. It provides the same functionality plus a few other features. I was wondering, is your code open source? I'd like to have a look at it because in the summer im starting my own tiling windows manager for Windows (porting xmonad from UNIX) :D

foxX
07-03-2011, 12:53 PM
I'm considering releasing the source.

Autohotkey didn't work for me for removing the borders in HoN - got funky results due to the window getting resized / the mouse hotspot getting offset and that's why I coded this.

foxX
07-22-2011, 01:28 PM
updated to version 2

foxX
07-22-2011, 07:31 PM
updated to version 3

foxX
07-23-2011, 11:11 AM
updated to version 4

Mordiggian
07-23-2011, 01:33 PM
Uh, not to belittle this, but turning off exclusive mode already runs HoN in a borderless window (Unless you mean BW for resolutions other than desktop, in which case, nice job).

foxX
07-23-2011, 05:10 PM
yes, borderless in windowed mode, as in the screenshots

ZokNy
07-25-2011, 08:58 PM
Looks cool, but how differs this from nircmd (http://www.nirsoft.net/utils/nircmd.html)?

nircmd.exe win -style title "Heroes of Newerth" 0x00C00000
nircmd.exe win setsize process hon.exe 0 0 1280 720
nircmd.exe win center class "K2_Direct3D"

foxX
07-26-2011, 06:00 AM
never knew about it, thank you!
before starting reading about this, and programming it i only tried making the window borderless with autohotkey and i didn't like the result - mouse hover effects were buggy, off by a few pixels, exactly as given by SM_CYCAPTION, SM_CXDLGFRAME, SM_CYDLGFRAME.

LE. yep, same issue, the mouse hover effect is registered a few pixels off; I wrote my own specifically for this problem

foxX
08-03-2011, 06:56 AM
updated to version 5
http://141.85.0.93/%7Efoxx/mob/Deframe/Deframe.jpg

foxX
08-14-2011, 12:26 PM
source code made available

CerealMilk
08-20-2011, 11:13 PM
i cant download it ...

foxX
08-26-2011, 03:53 PM
oops, let me move the binaries to the university server

Darnok
10-09-2011, 05:53 PM
This is awesome!

Shakil
10-22-2011, 01:43 PM
I can't get this to work, nothing happens when i run the application its on admin, installed runtime and have it updated im on Win 7 x64 plz help.

Glissant
11-06-2011, 05:13 PM
I can't get this to work, nothing happens when i run the application its on admin, installed runtime and have it updated im on Win 7 x64 plz help.

Same thing here. Win 7 x64 Home Premium.

Flawless
11-21-2011, 01:53 AM
Having the same problem as the two above.

handi
11-21-2011, 03:06 AM
You need to have windowed mode previously set before opening hon. Once opened, hold shift and right click hon's taskbar button, there should be a borderless option.

Flawless
11-22-2011, 12:36 PM
Yeah, there isn't one.

Aizen`
11-27-2011, 07:51 PM
Same problem as Flawless, Glissant and Shakil. Same Operating System, nothing happens.

Skyies
12-08-2011, 02:09 AM
didnt work here either.

DruMorgan
12-08-2011, 02:21 AM
Why can't you just turn "Exclusive Mode" off? Or am I missing something here?

Duqil
12-29-2011, 07:06 PM
Sounds like an awesome program! But i can't get it to work... mind making some kind of getting-started tutorial anyone?

foxX
01-28-2012, 01:20 PM
Ah, finally back. I think what you're doing wrong is you start the game before starting the program.
Have you tried first running Deframe and only then starting HoN? It's based on window creation events.

Tee_Pee
01-31-2012, 08:32 PM
Same here, nothing happens. Tried running it before and after, as Administrator, still nothing. Using Win7 HP 64 bit.

foxX
02-09-2012, 05:28 PM
Interesting. There might be something with Home editions of Windows 7. Is the process running after starting the program on your machine though?

Blisz
02-09-2012, 08:40 PM
If i run the file from winrar it starts but if i put the map not my HDD it won't start. Does it record the game of it's own or am I missing something here?

PsychoClown
02-11-2012, 02:32 PM
I'm considering releasing the source.

Autohotkey didn't work for me for removing the borders in HoN - got funky results due to the window getting resized / the mouse hotspot getting offset and that's why I coded this.

What exactly are you hooking for this? Off the top of my head I'd just patch the respective CreateWindow(Ex) param, or alternatively patch/hook some D3D.

Macabrus666
04-13-2012, 09:54 AM
I really want to use this application but it's not working for me, when I open it automatically close,
I checked the processes and there is not any deframe.exe

Im using windows 7 x64 ultimate.

WsJoke
05-15-2012, 05:48 PM
I really want to use this application but it's not working for me, when I open it automatically close,
I checked the processes and there is not any deframe.exe

Im using windows 7 x64 ultimate.

+1 Win7 x64 prof


Either this:

Looks cool, but how differs this from nircmd (http://www.nirsoft.net/utils/nircmd.html)?

nircmd.exe win -style title "Heroes of Newerth" 0x00C00000
nircmd.exe win setsize process hon.exe 0 0 1280 720
nircmd.exe win center class "K2_Direct3D"

Works like charm :)