Peter,
I had no idea either but a very simple google search turned up this:
http://www.microsoft.com/whdc/system/pnppwr/wmi/default.mspxNot positive that's it, but it wouldn't take much to find out.
>what is wmi?
>
>Peter
>
>
>
>>>I have 2 monitors one 1690x1050 (dell inspiron 9100) the other is a viewsonic VA800 at 1280x1024
>>>
>>>how can I find out in a program what the size of both are, so I can put a window on one (oForm1.left=0) and th other on the second(centered) oForm2.left=1680+1/2 of secondmonitor width - 1/2 of oForm2.width ...
>>>
>>>Thanks in advance
>>>
>>>
>>>Peter
>>
>>Peter, you can try using WMI to do this:
>>
>>
>>loLocator = createObject("wbemScripting.SwbemLocator")
>>loWMI = loLocator.ConnectServer()
>>
>>loMonitors = loWMI.ExecQuery('Select * from Win32_DesktopMonitor')
>>
>>for each loMonitor in loMonitors
>> ? loMonitor.DeviceID, loMonitor.ScreenWidth, loMonitor.ScreenHeight
>>endfor
>>
>>
>>I do not have 2 monitors to test, so let me know if I got the correct class :)