A coder's home for Marc "Foddex" Oude Kotte, who used to be located in Enschede, The Netherlands, but now in Stockholm, Sweden!
foddex.net

Command & Conquer: Zero Hour multi monitor fix

Originally posted at Sun 04-07-2010 14:08:27, in the gaming industry category.

Are you as annoyed as me that EA never bothered to fix multi-monitor support in Command & Conquer: Zero Hour? It's been bugging me for years, and I finally decided to do something about it.

I wrote a simple application in under 10 minutes, that when running checks if the current application is C&C:ZH, and if so, limits the movement of the mouse to the actual game window.

Very, very simple, and highly effective!

The application is available here (a whopping 4.2kB) for free ;-). Simply unzip, run the program, and start C&C:ZH!

Have fun!

-- Foddex



37 comment(s)

Click to write your own comment

On Sat 10-12-2011 06:43 Alan wrote: Worked great! Thanks!
On Mon 12-12-2011 15:43 foddex wrote: Cool! Nice someone else actually used it as well :o)
On Sun 20-01-2013 15:24 Nick wrote: Thanks a lot!

This problem was very annoying with my tripple screen setup for some time now.

Works like a charm :)
On Thu 30-10-2014 08:40 Al Rumaithi wrote: God damn! Thanks a lot!
On Sat 15-11-2014 16:30 Ben wrote: So glad i found this! thanks so much man ^_^
On Sat 28-02-2015 04:53 Jeff wrote: Wow, I love you. Thanks so much!

Would you happen to have one just for Generals, not Zero Hour? I still play the campaigns.
On Wed 10-06-2015 03:12 ZHPlayer wrote: working, thanks :) i did get a serious error tho but it was into a long game and sometimes it happens. Wish this would be an utility you could modify to scan for any particular game that would have this issue with multiple screens.
On Sat 05-09-2015 22:37 Michael wrote: Thaaaaaaaaaaaaaaaaaaaaaaank youuuuuuuuuuuuu!!!!
On Sun 20-12-2015 11:48 Alberto wrote: Thanks bro!
On Sun 28-02-2016 08:08 Cypher wrote: Is it possible to write this so that is can be used with zero hour mods
On Sat 30-07-2016 15:18 Vexsbe wrote: Not working for me.. :(
Your appli can't detect my cczh
On Wed 03-08-2016 08:38 uuu wrote: tried with shockwave mod, doesn't work.
Dual monitor tools doesn't work for me in that mod either
On Wed 03-08-2016 09:26 foddex wrote: @Vexsbe, @uuu, are you guys maybe using Windows 10? That would be the only reason I can see it doesn't work, because it has worked for everybody over the last 6 years :)

If you guys are on Windows 10 and read this, maybe you can try the following and let me know here if it works:
- unzip the CnCMultiMonFix.zip somewhere
- right click the CnCMultiMonFix.exe application, and click "Send to" -> "Desktop (create shortcut)"
- on the desktop shortcut, right click, and go to the "Compatibility" tab
- enable "Run this program in compatibility mode for:"
- select "Windows 7", or if that doesn't work, try "Windows Vista", or one of the others
- run the applciation using the shortcut on the desktop (so don't start the application from explorer!)
On Fri 05-08-2016 11:21 Vexsbe wrote: Don't work too.. :(
with compatibility win7, vista (sp1,2 & 3) and xp (sp2 & 3)

reinstalled supreme commander :)
if u have the solution, tell me please ! :D

thanks :p
On Fri 26-08-2016 07:54 Tyler wrote: Holy crap! I was sort of skeptical (anyone downloading something via the web should be) but I took the chance, downloaded it and ran it. Works GREAT!

I have a 3 monitor setup
Windows 7 Ultimate 64 bit
game bought through Origin in bundle
works on CnC normal and zero hour

Thanks again! :D
On Fri 16-09-2016 16:32 Vexsbe wrote: Yeah working now :)
don't understand why but it work !

use with origin bundle (17'c&c pack)
On Fri 06-01-2017 22:06 nothin wrote: Thanks bro!!!! Looked for something like that for years!!!
On Thu 09-03-2017 16:14 Marvin wrote: Hej Marc,

do you found a solution to solve this problem on a windows 10 computer?

How do you locate the window? Are you just searching by name? Because im using the german version from the origin bundle and of course my window title is in german too. Maybe thats the reason why its not working?

Compatibility mode doesnt work too.


Greetings from Germany

Marvin
On Sun 12-03-2017 22:20 foddex wrote: Unfortunately I don't have the source code anymore... :( tried searching some archives, but can't find it anymore. If I ever do, I'll publish it here.
On Mon 20-03-2017 08:32 foddex wrote: "How do you locate the window? Are you just searching by name? Because im using the german version from the origin bundle and of course my window title is in german too."

Yes, it's looking for a window with the title "Command & Conquer (TM) Generals Zero Hour", and a class name "Game Window" (internal Windows API thing). That's what I got from looking at the .exe though, as said I don't have the source anymore :/ sorry guys
On Wed 24-05-2017 14:52 Tommy nL. wrote: Will this work of i wannabe play on 21:9 monitor resolutie.? Cause i wanna play this sobad... On May new monitor
On Wed 24-05-2017 16:23 foddex wrote: I would expect so. Just try it!
On Thu 03-08-2017 08:07 Naveen wrote: Bro, you made my day....
On Thu 03-08-2017 08:07 NaveenGanesan wrote: this works awesome.
thanks bro..
On Fri 10-11-2017 23:41 Amadeus wrote: Nice! Thanks!
On Tue 31-07-2018 05:36 Dominic wrote: Thank you very much helped me out a lot !
On Tue 31-07-2018 05:37 Dominic wrote: Thank you very much helped me out a lot !
On Tue 21-08-2018 22:10 Neil wrote: Any chance of sharing the source code? I'd be keen on a version for the original generals game.
On Wed 22-08-2018 08:40 foddex wrote: Neil, as I said above, I unfortunately lost the code... :( can't find it anywhere anymore
On Mon 03-12-2018 14:11 elpollito wrote: works great! tnx man great job
On Tue 14-01-2020 04:13 Shane wrote: Still works to this date. Awesome.
On Wed 05-02-2020 13:47 Arthur wrote: Still works in Win10, I am using Origin's CCZH. Nice work, thanks
On Wed 03-06-2020 12:17 Dilip wrote: It works with single monitor, not with two.
I am on laptop and the monitor resolution is different at 16:9.
game window lost focus, unlocking...
On Fri 13-08-2021 10:15 Steve wrote: Works like a charm on Windows 10 EA Origin, thanks
On Fri 13-08-2021 10:15 Steve wrote: Works like a charm on Windows 10 EA Origin, thanks
On Wed 22-06-2022 04:55 Nightmare wrote: Works on w11?
On Mon 31-10-2022 16:32 Jonathan wrote: Works perfect in windows 10
Name:
URL: (optional!)
Write your comment:
Answer this question to prove you're human:
What year do we live in?