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
Which function is used to perform string comparison?
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
How to Convert Hex color code to color name in VB Script?
What is the purpose of the err object in the vbscript language?
What is the use of the formatdatetime function in the vbscript language?
By default in vbscript the arguments passed to functions and subroutines are by reference or by value?
What are the environments supported by vbscript language?
Explain the .wsf files?
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
How to Enter Values on the Command promt using VB script
How to pass argument by reference to a function in vbscript?
What are the valid scopes of a variable in vbscript?
How to write VB script for login module?
hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?
what is the features of visual basic?