Get mouse page and x,y in twips.
Declaration
int GetMouseXY(out int PageNr, out int PageX, out int PageY);
Description
This function can be used to calculate the page under the mouse cursor and the X and Y position on the page.
The result value is 0 if there is no page under the mouse cursor, otherwise it can have the following values:
InsidePage=1,
TopMargin=2,
BottomMargin=3,
LeftMargin=4,
RightMargin=5,
AfterTextBody=6,
InsideTextBody=7.
X and Y are measured in twips (inch/1440)
Also see GetXY which retrieves various properties.
Example C#:
private void wpdllInt1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
int x,y,p;
if (wpdllInt1.Memo.GetMouseXY(out p,out x,out y)>0)
{
stHint.Text =
"P" + p.ToString() +
"X" + x.ToString() +
"Y" + y.ToString();
}
}
Example VB6:
Dim x As Long
Dim y As Long
Dim page As Long
Memo.GetMouseXY page, x, y
Category
RTF2PDF Note: This method is not included IWPEditor