VisWebPageSettings.GetPhysicalDimensions method

Based on the enumerated screen-resolution value passed to the method in the eRes parameter, places real-world values for screen width and height in pixels in the pnWidth and pnHeight variables passed to the method as parameters.

Syntax

expression.GetPhysicalDimensions (eRes, pnWidth, pnHeight)

expression An expression that returns a VisWebPageSettings object.

Parameters

Name Required/Optional Data type Description
eRes Required VISWEB_DISP_RES A screen-resolution value.
pnWidth Required Long The number of horizontal screen pixels.
pnHeight Required Long The number of vertical screen pixels.

Return value

Nothing

Remarks

For example, if you pass in the VISWEB_DISP_RES enumerated screen-resolution value res1024x768 for eRes, the values 1024 and 768 are returned in pnWidth and pnHeight.

Example

The following example shows how to use the GetPhysicalDimensions method to determine the screen width and height that correspond to the screen resolution passed to the method as the first parameter.

Public Sub GetPhysicalDimensions_Example() 
 Dim vsoSaveAsWeb As VisSaveAsWeb 
 Dim vsoWebSettings As VisWebPageSettings 
 Dim lngWidth As Long 
 Dim lngHeight As Long 
 
 Set vsoSaveAsWeb = Visio.Application.SaveAsWebObject 
 Set vsoWebSettings = vsoSaveAsWeb.WebPageSettings 
 
 vsoWebSettings.GetPhysicalDimensions res1280x1024, lngWidth, lngHeight 
 
 Debug.Print lngwidth; lngHeight 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.