Getting ALL screen resolutions from 1 screen

Ken Ray kray at sonsothunder.com
Tue Jun 29 16:12:36 EDT 2010


Mark,

You can do this with VBScript - here's a script that gets all possible video
controller resolutions:

' List All Possible Video Controller Resolutions


On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery _
    ("Select * from CIM_VideoControllerResolution")

For Each objItem in colItems
    Wscript.Echo "Horizontal Resolution: " & objItem.HorizontalResolution
    Wscript.Echo "Number Of Colors: " & objItem.NumberOfColors
    Wscript.Echo "Refresh Rate: " & objItem.RefreshRate
    Wscript.Echo "Scan Mode: " & objItem.ScanMode
    Wscript.Echo "Setting ID: " & objItem.SettingID
    Wscript.Echo "Vertical Resolution: " & objItem.VerticalResolution
    Wscript.Echo
Next


Have fun!


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

On 6/29/10 10:36 AM, "Mark Stuart" <mstuart at adaptcrm.com> wrote:

> Hi all,
> 
> Platform: WinXP
> Rev: revStudio 4.0
> 
> I'm wanting to get all possible screen resolutions from a Windows
> computer.
> I know "the screenRects" gets the current resolution from all attached
> screens, but I want to get all possible screen resolution range settings
> from only 1 of the screens.
> 
> Eg: on my computer screen, the range goes from 800x600 all the way to
> 1280x1024.
> I want to get each of the settings in this range.
> 
> Anyone know if revStudio has this function or do I have to get it with a
> VBScript, or something?
> 
> Regards,
> Mark Stuart
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the Use-livecode mailing list