GetXY Method |
[Top] [Chapter] [Previous] [Next] |
Retrieves different X,Y positions from the editor Declaration void GetXY([In] int Mode, [In, Out] ref int X, [In, Out] ref int Y); Description You can use this method to receive different coordinate values. Mode selects the property to read: 0: X and Y are the position of the cursor in editor X,Y coordinates. 1: X and Y are the position of the cursor in client X,Y coordinates. 2: X and Y are the position of the cursor in screen X,Y coordinates. 3: X and Y are the position of the cursor on the page in twips (inch /1440). 4 : X and Y are the baseline of the current paragraph in client coordinates. 5 : X and Y are the baseline of the current paragraph in screen coordinates. 6 : X and Y are the upper left corner of the selected text in screen coordinates. 7 : X and Y are the lower right corner of the selected text in screen coordinates. 8 : X and Y are the upper left corner of editor in screen coordinates. 9 : X and Y are the lower right corner of the editor in screen coordinates. 10: Get horizontal and vertical scroll position. 11: Set horizontal and vertical scroll position. Use value=-1 to not set the X or Y scrolling. 12: X and Y are the width and height of the virtual desktop inside the editor. 13: X and Y are the width and height of the text. 14: X and Y are physical margin used by the current printer. (PrintXOffset, PrintYOffset) 15: X and Y are the current logical horizontal and vertical resolution used by the rendering engine. Usually this value is 600. (CurrentXPixelsPerInch, CurrentYPixelsPerInch) 16: X and Y are the current mouse cursor position.
Example VB6: Dim x As Long Dim y As Long Memo.GetXY 2, x, y Category |