Type: Integer
Returns the width of the visitor’s screen size resolution. For example, a visitor with their screen resolution set to 1024x768 would return 1024.
Note: You must call the GetExtPropertiesEx method before checking the value of this property, unless the browser is a fixed size device, such as the case for WebTV and handheld phones. This property requires the Professional or Enterprise Edition of BrowserHawk.
Tip: See the extproperties.asp example located in your BrowserHawk directory for detailed information and examples on using this property.
Example:
<%
set bhObj = Server.CreateObject("cyScape.browserObj")
bhObj.SetExtProperties "screensize" 'this is the equivalent of "height, width"
bhObj.GetExtPropertiesEx
%>
<html>
Your screen size is: <% =bhObj.width%> X <% =bhObj.height%>
</html>
Special notes for this property:
Not all browsers are capable of having their screen size detected. In this case the values that cannot be determined will be 0. You should check for 0 and use a default value of your choice. For example, if Width comes back 0 you may wish to use 800 as a default (assume a screen size of 800x600).
If the user’s JavaScript is disabled this property will not be available.
See Also: