To determine which line number the cursor of a Memo component is in, you can use the
Windows API function SendMessage. (API = Application Programmr
Interface)
In the example below, the integer variable LineNumber receives the line number that
the cursor of Memo1 is in: