Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dual monitor screen size?
Message
From
07/07/2004 15:26:32
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
07/07/2004 15:16:26
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00921392
Message ID:
00921569
Views:
24
Peter,

I had no idea either but a very simple google search turned up this:

http://www.microsoft.com/whdc/system/pnppwr/wmi/default.mspx

Not 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 :)
Previous
Reply
Map
View

Click here to load this message in the networking platform