Question and Answer Database FAQ1121D.txt Retrieving the line number that a memo's cursor is on. Category :VCL Platform :All Product :All 32 bit Question: How can I retrieve the line number that a memo's cursor is on? Answer: The zero based location of the cursor can be retrieved by sending an EM_LINEFROMCHAR message. WParam contains the character number that you wish the line number for, or -1 for the current line (where the caret is located or the beginning of a text selection). Example: LineNumber := Memo1.Perform(EM_LINEFROMCHAR, -1, 0); 7/16/98 4:31:28 PM
Last Modified: 01-SEP-99