MSFN Forum: How To *get* The Current Video Resolution - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How To *get* The Current Video Resolution Rate Topic: -----

#1 User is offline   Maelstorm 

  • AT Field Pattern Blue
  • PipPip
  • Group: Members
  • Posts: 265
  • Joined: 22-July 04

Posted 01 March 2005 - 06:00 AM

Is there a way to find out what the current video resolution is in Windows? I'm running a script that needs to know that the current resolution is. In the workstation, I found a regkey that changes values when the resolution changes, but this is missing on another machine. So, it seems that the value is machine specific and quite possibly installation specific.

So, how do we do it?


#2 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 01 March 2005 - 07:22 AM

http://www.robvander....com/index.html

scrol down to the middel of the page

#3 User is offline   PeonPower 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 21-February 05

Posted 01 March 2005 - 08:58 AM

This is a simple vbs script which echoes the height and width

On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

strComputer = "localhost"

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_DesktopMonitor", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each objItem In colItems
	WScript.Echo "ScreenHeight: " & objItem.ScreenHeight
	WScript.Echo "ScreenWidth: " & objItem.ScreenWidth
Next


#4 User is offline   Maelstorm 

  • AT Field Pattern Blue
  • PipPip
  • Group: Members
  • Posts: 265
  • Joined: 22-July 04

Posted 01 March 2005 - 01:19 PM

sixpack, on Mar 1 2005, 05:22 AM, said:

http://www.robvander....com/index.html

scrol down to the middel of the page
<{POST_SNAPBACK}>

That was one of the first sites I found when searching. The script doesn't work on XP even though there are 3 different versions of it.

Thanks for responding though.

#5 User is offline   Maelstorm 

  • AT Field Pattern Blue
  • PipPip
  • Group: Members
  • Posts: 265
  • Joined: 22-July 04

Posted 01 March 2005 - 03:35 PM

PeonPower, on Mar 1 2005, 06:58 AM, said:

This is a simple vbs script which echoes the height and width


That was exactly what I was looking for.

Domo Arigato Gozaimasu

#6 User is offline   PeonPower 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 21-February 05

Posted 02 March 2005 - 01:09 AM

Thank Scriptomatic 2.0 =]

Very useful program, select the class you need and it'll show a script that echoes all of the information of that class. Easy =]

#7 User is offline   Martin Zugec 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,373
  • Joined: 24-January 04

Posted 02 March 2005 - 01:18 AM

Yep, I like whole "matic" family... Adsimatic, scriptomatic and tweakomatic...

I think U could use wmic also, like wmic desktop get screenwidth, screenheight

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy