Page 1 of 1 1
Topic Options
#110273 - 2003-12-13 09:46 PM Available Video Resolution
Richie19Rich77 Offline
Seasoned Scripter
*****

Registered: 2002-08-16
Posts: 624
Loc: London, England
Hi Everyone

I want to write a program that allows the user to change the video resolution, but only giving them the resolution options that the graphics card supports.

I have a program that can change the resolution but do not know how to find out the graphics card capabilities.

Thanks

Top
#110274 - 2003-12-13 10:00 PM Re: Available Video Resolution
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
That's a tough one as the possible display resolutions are defined by both the graphics card and the connected monitor. It also requires the correct graphics card and monitor drivers to be installed.

You can find available video resolutions in WMI under Win32_VideoController and Win32_VideoSettings. Monitor info is in Win32_DesktopMonitor.
_________________________
There are two types of vessels, submarines and targets.

Top
#110275 - 2003-12-13 11:16 PM Re: Available Video Resolution
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4567
Loc: USA
Will this help?

Code:

$Computer = "."
$objWMIService = GetObject("winmgmts:\\" + $Computer + "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from CIM_VideoControllerResolution")
For Each $objItem in $colItems
? "Horizontal Resolution: " + $objItem.HorizontalResolution
? "Number Of Colors: " + $objItem.NumberOfColors
? "Refresh Rate: " + $objItem.RefreshRate
? "Scan Mode: " + $objItem.ScanMode
? "Setting ID: " + $objItem.SettingID
? "Vertical Resolution: " + $objItem.VerticalResolution
?
Next


Top
#110276 - 2003-12-13 11:18 PM Re: Available Video Resolution
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
These results will need to be cross-correlated against the monitor resolutions and refresh rates to weed out any incorrect settings.
_________________________
There are two types of vessels, submarines and targets.

Top
#110277 - 2003-12-14 02:38 PM Re: Available Video Resolution
Richie19Rich77 Offline
Seasoned Scripter
*****

Registered: 2002-08-16
Posts: 624
Loc: London, England
Thanks for the reply's.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 611 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.042 seconds in which 0.017 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org