23

I have a laptop with a USB to VGA adapter which allows me to add a third monitor to my laptop (the second monitor uses the onboard slot).

It worked fine on Windows Vista - you could go into Windows' display settings and Windows would recognize the third monitor and let you drag it around accordingly. With Windows 7, the third monitor literally is not there in Windows' display settings. The driver allows you to display to the third monitor, but you can't move where it is. The display settings are misplaced relative to my other two (if you drag windows over to it, they end up on the bottom when it should be aligned).

I called tech support and they said that there isn't a driver with this functionality for Windows 7 yet. But here's my hunch. The monitor placement is still somewhat similar to where I had it on Vista, it's just off about 500 pixels or so. I think there is either a registry key or driver file somewhere that is telling this monitor where to exist. If I could just modify the number and move it up 500 pixels, it would be in the right place and I don't have to wait 6 months for the company to come out with a new driver.

Any ideas?

8 Answers 8

10

Check out the various keys and folders in

HKEY_CURRENT_CONFIG\System\CurrentControlSet\Control\Video

Specifically in the innermost MonXXXXXXX sub-folders should be Attach.RelativeX and Attach.RelativeY values which are the monitors' location in relation to pixel 0,0.

Strangely when I check a Windows 7 machine here with two monitors, it doesn't seem to show the second monitor. But my XP machine shows all three of mine, so your mileage may vary.

If nothing else it's a place to start!

6
  • Great find! This is exactly they keys I was looking for. Modifying the relativeY value in two places and then restarting the extended desktop usb driver causes it to shift. Now here's the remaining problem: Because of the way the monitors are configured, I need to put in a NEGATIVE value. How would I do that? Putting in a positive value only puts the monitor I need even lower. Here is my setup: 2 3 1 Those are the monitor numbers (1 and 2 are touching and three is off to the side). Changing the attach.relativeY value makes 3 appear to go even lower, I want to raise it.
    – dfree
    Feb 9, 2010 at 21:45
  • looks like the formatting didn't keep there but hopefully you get the gist - 2 is above 1 and three is on the right of both of them, centered in between the two. Digitally, windows is placing it next to monitor 1.
    – dfree
    Feb 9, 2010 at 21:47
  • Waht happens when you try entering a negative value? In the end, you may have to rig a startup script to make the adjustment when you log in (if it's not going to stick on it's own). Feb 10, 2010 at 4:56
  • 2
    You can't enter a negative value, windows won't let you. In the hexidecimal part of the registry you can put numbers and letters and in the decimal portion you can only put numerical values. That 4 billion number I posted definitely works and sticks, I'm just not sure why. Maybe there is some sort of code in windows that means that the 429496xxxx denotes a negative number. The last 4 numbers correlate to the amount of pixel deslpacement beyond the negative.
    – dfree
    Feb 11, 2010 at 2:57
  • 1
    Try using this to convert from 32 bit signed to unsigned. Enter the negative value; then paste in the unsigned value which is 4294967295. onlinetoolz.net/…
    – LawrenceC
    Oct 13, 2020 at 16:02
35

For anyone that is looking for the key in Windows 7 it is in one of the folders in:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\

Look for Position.cx and Position.cy in each of the subfolders; you have to edit the hex string.

Binary / decimal / hexadecimal converter:

http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html

4
  • 4
    How do you tell which configuration is the active one?
    – Adisak
    Jul 23, 2012 at 16:09
  • Adisak - I found it easier to just change according values in all positions.
    – Artanis
    Jan 31, 2016 at 15:17
  • 2
    @Adisak Old question, but for anyone still looking for this, here's what I did: Right click -> export the configuration node (just in case), save it somewhere. Delete every single child node. Sign out of windows. Sign back in. This will create 1 new item which is the current/active one.
    – René
    May 19, 2016 at 17:30
  • 1
    To find the active configuration you can use MonitorInfoView. Configuration names are lists of all monitor identifiers joined with *, identifiers will start with values from Registry Key column in MonitorInfoView.
    – gronostaj
    May 25, 2017 at 11:11
5

Subtract the amount you wish to make negative from 4294967296 to get the number you need for the registry. I.e., for 4294967296 - 250 = 4294967046.

For you geeks...

The annoyance here is due to the fact that the registry editor doesn't interpret the 32 bits as anything other than an unsigned decimal integer or a hexadecimal representation of binary data. However, when Windows retrieves that binary data when positioning your displays, it interprets it as a signed integer. In order for Windows to know that a 32-bit signed integer is negative, it sets the last bit to 1 (leftmost) and the rest of the bits are inverted. So -1 will have a binary value of 11111111 11111111 11111111 11111111 (hex: FF FF FF FF). If you translate that into an unsigned decimal integer (like the registry editor does), you get 4,294,967,295. So, for our purposes, 0 equates to 4,294,967,296 which you can simply add your negative number to in order to get the unsigned decimal integer you need that the registry editor saves in binary form and that the system will later interpret as a negatively-signed integer.

4

I wish I knew why this worked but I know it does:

To get the monitor to go UP (because negatives aren't allowed by the registry), you have to use values for attach.relativeY like this: 4294967040

Thanks to this forum for helping figure out that part - http://www.ureader.com/msg/164488.aspx

If you change the last 4 digits of that number down, the monitor goes down and vice-versa. This will also work for attach.relativeX. A little tweaking and my setup was back to normal.

Who needs functional drivers pshh

5
  • and thanks to techie007 for getting me on the right path
    – dfree
    Feb 10, 2010 at 7:07
  • Sweet, do I get the 'correct answer' mark for pointing out the key? :) Feb 10, 2010 at 16:35
  • Can you do half a correct answer? lol
    – dfree
    Feb 11, 2010 at 2:54
  • Only if I can give you half a point for your open ended question. :) To me it seems you asked for "any ideas" on how you could fix it by using "a registry key or driver file somewhere" - I pointed out a registry key that you then used to set it. What more do you want? Blood? :) I guess I'll have to include negating 32-bit word hexadecimal number lessons in my next answer. ;) Feb 11, 2010 at 3:07
  • 1
    This is because it is the positive integer representation of a negative integer. Look up 2's complement if you are interested in knowing how to represent the negative number, and then treat the bits as an unsigned integer to get the correct input value.
    – Edwin Buck
    Mar 2, 2015 at 19:52
3

A quick update of this old thread for Windows 10.

The Attach.RelativeX and Attach.RelativeY keys are found here:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UnitedVideo\CONTROL\VIDEO\

Below that there will be keys for the machine and sub-keys >00, >01, etc., for each display.

The same rules for negative positioning still apply.

2

I found that to activate without logout, you could run

    DisplaySwitch.exe /extend

to activate your updated profile in the register instantaneously.

So to one-click automated profile switching , you could batch it up your register settings before calling the above cmd.

For the detail use case, check this guide for creating hotkey or shortcut for extended displays

1

Instead of calculating negative values it may be easier to understand if you keep all values positive by making a logical 0,0 at the physical top left of a virtual box you would draw if you tried to surround all the monitors. Think like when you move a monitor up and left, that you are really pushing the others away to the right and down.

For example, I had 1280x1024 and 1920x1200 monitor with the first smaller one defaulting to the top right side of the second, not the bottom left of the first where it is physically positioned (left) and aligns-with (bottom edge is at same height, the top is lower of course because it's not as high).

So to start with the second 1920x1080 monitor was at position 0,0 and the first at 1920,0. Instead of trying to calculate negative -(1920 + 1280), (1200 - 1024) for the first monitor I just put the first monitor at all positive values 0,(1200 -1024) and the second at 1280, 0.

Logging off Windows then logging back on applied the settings for me. It's also useful to know that this works on Windows Hyper-V Server (I just did this on 2012 R2 which means these settings still work in Windows 8 and 8.1). That's really useful for people locked out of the screen resolution settings but trying to achieve a "bare metal" style host PC (you hardly ever have to update or reboot) and work purely with virtual machines inside via Remote Desktop (copy that from another machine).

Thanks to techie007 for the original answer, that was the key to work all this out. If you mark this variant useful don't forget to "up" his answer and the question too.

1

For Sean's answer, to find the current configuration:

Each configuration has a Timestamp value, so look at which of those values is the highest one

After you find the configuration with the newest timestamp, if you rearrange the monitors in the Windows Display Settings, you should also see the timestamp change.

Also, this seems to be the format for the naming of each configuration:

  • * means the monitors are duplicated

  • + extended monitors

  • ^ every entry has this at the end, and then followed by some numbers which I think is some kind of identifier for the configuration. So those numbers are not a monitor ID.

Example

name1*name2+name3^configurationID = 1 and 2 are duplicated, and 3 is extended

name1+name2+name3^configurationID = all 3 monitors are extended

You must log in to answer this question.