Description
These two Fred methods return the horizontal and vertical position of the mouse pointer.
Syntax
dim iX as Integer = Page.GetMouseX dim iY as Integer = Page.GetMouseY |
Remarks
The horizontal and vertical position of the mouse are reported from the left/top edge of the page, and not from the 0,0 point. This causes a misalignment with the Page.GetSelectionX and Page.GetSelectionY, which return the horizontal position of the selected object. In other words, the value, returned by the Page.GetSelectionX/Page.GetSelectionX and the Page.GetMouseX/Page.GetMouseX will be different, even if you position the mouse pointer precisely on the left edge of the selected object.
To make returned values compatible, always use
dim curMouseX as Integer = Page.GetMouseX + Page.GetLeftM
dim curMouseY as Integer = Page.GetMouseY + Page.GetTopM
Context
Page designer