function GetMonitorResolution()
{
var wbemFlagReturnImmediately = 0x10;
var Mode = wbemFlagReturnImmediately;
var Query = "Select * from Win32_VideoController";
var oWMIService = GetObject( "winmgmts:\\\\.\\root\\cimv2" );
var oCollection = oWMIService.ExecQuery( Query, "WQL", Mode );
var oItems = new Enumerator( oCollection );
for ( ; !oItems.atEnd(); oItems.moveNext() ) {
var oItem = oItems.item();
// dump info
LogMessage( "Resolution [x,y]: " +
oItem.CurrentHorizontalResolution + ", " +
oItem.CurrentVerticalResolution );
}
return;
}
*/
From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Jon Swindells
Sent: Monday, July 06, 2009 9:05 PM
To: soft...@listproc.autodesk.com
Subject: Re: get resolution of 2nd monitor via script
From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Jon Swindells
Sent: Tuesday, July 07, 2009 5:19 PM
>> Have you tried using some of the flags in your query ?I have now. No change in result unfortunately. :-(>> any reason you can't write the plug in c# ?I don't use C#.I write 95% of my tools in JScript because it comes with XSI, is cross platform, and doesn't require additional software to be installed to do most things. For the other 5%, typically performance related stuff, I use C/C++.Matt
From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Jon Swindells
Sent: Tuesday, July 07, 2009 11:10 PM
http://msdn.microsoft.com/en-us/library/dd145072(VS.85).aspx