Previous Document Next Document
Window.ScreenToDocument

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

Member of Window

The ScreenToDocument property converts screen coordinates to document coordinates

Parameters
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

The following code example converts the 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 2007 Corel Corporation. All rights reserved.