Share via


DocumentWindow.PointsToScreenPixelsX Method

Converts a horizontal measurement from points to pixels. Used to return a horizontal screen location for a text frame or shape. Returns the converted measurement as a Single.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Function PointsToScreenPixelsX ( _
    Points As Single _
) As Integer
'Usage
Dim instance As DocumentWindow
Dim Points As Single
Dim returnValue As Integer

returnValue = instance.PointsToScreenPixelsX(Points)
int PointsToScreenPixelsX(
    float Points
)

Parameters

  • Points
    Type: System.Single
    The horizontal measurement (in points) to be converted to pixels.

Return Value

Type: System.Int32
Single

Examples

This example converts the width and height of the selected text frame bounding box from points to pixels, and returns the values to myXparm and myYparm.

With ActiveWindow

    myXparm = .PointsToScreenPixelsX_

        (.Selection.TextRange.BoundWidth)

    myYparm = .PointsToScreenPixelsY _

        (.Selection.TextRange.BoundHeight)

End With

See Also

Reference

DocumentWindow Interface

DocumentWindow Members

Microsoft.Office.Interop.PowerPoint Namespace