getcaretpos (user32)
Last changed: -203.217.36.88

.
Summary

C# Signature:

[DllImport("user32.dll")]
static extern bool GetCaretPos(out Point lpPoint);

VB.NET Signature:

Private Declare Function GetCaretPos Lib "user32" (ByRef lpPoint As Point) As Integer

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Dim pt As Point
GetCaretPos(pt)

Debug.Write(String.Format("Caret position: {0}, {1}", pt.X, pt.Y))

Alternative Managed API:

Do you know one? Please contribute it!

- try GetCursorPos to get the cursor position

Documentation
GetCaretPos on MSDN