Previous Document Next Document

Object Model Reference : Classes : W : Window : Methods : Window.ScreenToDocument


Window.ScreenToDocument

Sub ScreenToDocument(XScreen As Long, YScreen As Long, XDoc As Double, YDoc As Double)

Description

Member of Window

The ScreenToDocument property converts screen coordinates to document coordinates.

Parameter
Description
XScreen
Specifies the x-coordinate on the screen
YScreen
Specifies the y-coordinate on the screen
XDoc
Specifies the x-coordinate in the document
YDoc
Specifies the y-coordinate in the document

VBA example

The following VBA example converts the specified screen coordinates to document coordinates.

Sub Test()
 Dim x As Double
 Dim y As Double
 ActiveWindow.ScreenToDocument 515, 404, x, y
 MsgBox "The screen coordinates (515,404) converted to document " & _
  "coordinates is (" & x & "," & y & ")."
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.