'------------------------------------
'Conversion Pixels to Points sans API
'------------------------------------
Function PixelsToPoints(Optional ByVal Pixels As Long = 1, Optional ByVal ZoomSensitive As Boolean = False) As Double
Dim PixelToPoint As Double
With ActiveWindow.ActivePane
PixelToPoint = 1 / ((.PointsToScreenPixelsX(1000) - .PointsToScreenPixelsX(0)) / 1000)
PixelsToPoints = Pixels * PixelToPoint * IIf(ZoomSensitive, (.Parent.Zoom / 100), 1)
End With
End Function
'------------------------------------
'Conversion Points to Pixels sans API
'------------------------------------
Function PointsToPixels(Optional ByVal Points As Double = 1, Optional ByVal ZoomSensitive As Boolean = False) As Double
Dim PointToPixel As Double
With ActiveWindow.ActivePane
PointToPixel = ((.PointsToScreenPixelsX(1000) - .PointsToScreenPixelsX(0)) / 1000)
PointsToPixels = Points * PointToPixel / IIf(ZoomSensitive, (.Parent.Zoom / 100), 1)
End With
End Function