write a program to display the system specifications of
client system with the help of vb script.
Answer Posted / vasanth
Sub Screen_Resolution
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer
& "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From
Win32_DisplayConfiguration")
For Each objItem in colItems
'msgbox "Name: " & objItem.DeviceName
'msgbox "Color depth: " & objItem.BitsPerPel
'msgbox "Horizontal resolution: " & objItem.PelsWidth
'msgbox "Vertical resolution: " & objItem.PelsHeight
If objItem.PelsWidth <> 1024 Or objItem.PelsHeight <> 768
Then
MsgBox "Current screen resolution is "
&objItem.PelsWidth& " by " &objItem.PelsHeight
MsgBox "Scripts cannnot be executed, We only support 1024
by 768 "
ExitAction()
End if
Next
End Sub
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain about constants in vb script?
What is the use of the date function in the vbscript language?
What are the disadvantages of vbscript?
Explain about filter expression?
Which in-built function is used to format the number in the vbscript language?
Explain some uses of vb script?
I need to get some data from data base and store this
(retrieved) data in a excel sheet using VB script in QTP9.0
I have created connection for data base
I have created as excels sheet by using
Set XL=CreateObject("Excel.Application")
XLworksheet.cells(1,1).value= rs.fields.item("<
write any ttest cases using check points and parameterization
Mention how to assign a date value to a variable?
What is Procedure or Subroutine in VB Script?
Is vbscript a case-sensitive or case-insensitive?
what is the object hyrarchy in QTP for a web based application
Which constant is used for print and display functions and works as same as pressing enter key?
Explain the arrays in vb script?
Explain the support of asp for vb script functionality?