Grabbing primary desktop on dual monitor systems

BlitzMax Forums/BlitzMax Programming/Grabbing primary desktop on dual monitor systems

GfK(Posted 2008) [#1]
I need to grab an image of the primary desktop. I was using d-bug's desktop extension for this, but today I've tested it on my main dev PC which has two monitors and it grabs both of the monitors and I don't want that.

I could maybe do it in MaxGUI but I don't want to have to include the whole of MaxGUI just for that.

I thought about modifying the desktop extension but I have no idea how to go about this. All the documentation/code comments being in German (or something) didn't help, either.

Another solution I thought of was to grab both monitors, then crop it to the dimensions of the primary display. But it seems senseless loading a giant pixmap that I only actually need 50% of.

Ideas?


d-bug(Posted 2008) [#2]


Change DesktopPixmap in your desktopext copy to the one above, compile modules!



Please let me know if it is working. I can't test this by my own, course I don't have Win System with multiple screens. When it is working, I will add it to the module and upload a new version!

And YES, it is german and NOT something! ;)

cheers


~edit~
Forgot to mention, that I'm in holiday for the next week. So please don't worry, I won't answer!


GfK(Posted 2008) [#3]
Its kinda back to front!

If I try to grab desktop 0, it grabs my secondary monitor.

Desktop 1 grabs the primary monitor.

[edit]For some reason I had my primary monitor plugged into the DVI socket on my 7600GT, and the secondary monitor into the regular monitor socket. Swapped them over and it works now, but I'm still not completely sure it should make a difference which monitor is plugged into where.

Maybe there's a different way for you to determine which is set as the primary monitor in Windows? (my CRT which was plugged into DVI was set as my primary display)


plash(Posted 2008) [#4]
Go to the display properties (right-click on background, properties) and select 'Settings'. You should be able to drag the box labeled '1' (or '2') to either side of the other monitor, thus changing the order... I think.


GfK(Posted 2008) [#5]
Already thought of that - everything was as it should be; Primary monitor on the left, secondary on the right. It still got the secondary one.


GfK(Posted 2008) [#6]
Since d-bug is away on holiday for a week now, I will pay the sum of one million Zimbabwean Dollars* to anybody who can fix the above code so that it works correctly. :)

(if that's actually a lot, then I won't!)


Brucey(Posted 2008) [#7]
Given that 1.00 GBP = 89.8923 ZWD, you may wish to reconsider the offer, or I'll have to take you up on it :-p


GfK(Posted 2008) [#8]
Is that all? Blimey.


d-bug(Posted 2008) [#9]
*plopp*

hm, erm, hm... Is that one of those problems, that only appear on those cards with VGA and DVI Sockets? I remember, that my old GF7200 had a similiar problem with that issue. When you boot into ubuntu with that machine, the displays are also exchanged, right? (That was my problem, when I had this card.) This was a priority issue with VGA and DVI Sockets! In most cases the VGA-Socket was prefered as primary Socket. I have no idea how to fix that. Sorry man!


Volker(Posted 2008) [#10]
Is that one of those problems, that only appear on those cards with VGA and DVI Sockets?

This can be. I have one of those cards and spended one hour
under my desk, reconnecting my 17" and 19" monitors getting
back the arrangement with primary and secondary I had befor.
That was the moment I dedicied to buy two of the same type
and size. I never found out if it was the Nvidia software, the card
or my own stupidness.


d-bug(Posted 2008) [#11]
That was my solution too! I've simply bought a card with two DVI-Sockets! :D


GfK(Posted 2008) [#12]
I can't assume that everyone who has two monitors also has two DVI sockets. Lower end (and therefore more commonly used) graphics cards have one analog plus one DVI.


Volker(Posted 2008) [#13]
That was my solution too! I've simply bought a card with two DVI-Sockets!

Seems like I'm getting old.
Of course i do have two DVI-Ports on my Card.
But one of the monitors had only VGA so I used an adapter DVI->VGA.