code for getting system resolution is given in below example.
On Error Resume Next
strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * from Win32_VideoController")
For Each objItem in colItems
print "Current Horizontal Resolution: " & objItem.CurrentHorizontalResolution
print "Current Vertical Resolution: " & objItem.CurrentVerticalResolution
Next
On Error Resume Next
strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * from Win32_VideoController")
For Each objItem in colItems
print "Current Horizontal Resolution: " & objItem.CurrentHorizontalResolution
print "Current Vertical Resolution: " & objItem.CurrentVerticalResolution
Next
No comments:
Post a Comment
Please Leave your reply. We value your feedback and inputs