Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dual monitor screen size?
Message
De
07/07/2004 15:26:32
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
07/07/2004 15:16:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00921392
Message ID:
00921569
Vues:
22
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 :)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform