API Documentation > CorelDRAW > 2025-v26 > Window > IVGWindow
Window.DocumentToScreen method
Converts document coordinates into screen coordinates
Syntax:
Sub DocumentToScreen(ByVal XDoc As Double, ByVal YDoc As Double, ByRef XScreen As Long, ByRef YScreen As Long)
Parameters:
Name Type Description
XDoc
Double
YDoc
Double
XScreen
Long
YScreen
Long
Remarks:
The DocumentToScreen method converts document coordinates to screen coordinates.
Examples:
The following VBA example converts the specified document coordinates to screen coordinates.
Sub Test()
Dim x As Long
Dim y As Long
ActiveWindow.DocumentToScreen 4.25, 5.5, x, y
MsgBox "The document coordinates (4.25,5.5) converted to screen " & _
  "coordinates are (" & x & "," & y & ")." 
End Sub