property Edit.Count as Long
Counts the lines in the control.

TypeDescription
Long A long expression that specifies the number of lines in the control.

The Count property gets the number of lines in the control. Use the TextLine property to access the line based on its index. Use the Text property to access the control's text. Use the InsertText method to insert lines to the control. Use the DeleteLine method to delete a specific line.

The following VB sample prints the line in the control:

With Edit1
    Dim i As Long
    For i = 1 To .Count
        Debug.Print .TextLine(i)
    Next
End With

The following C++ sample prints the line in the control:

for ( long i = 1; i <= m_edit.GetCount(); i++ )
	OutputDebugString( m_edit.GetTextLine( i ) );

The following VB.NET sample prints the line in the control:

With AxEdit1
    Dim i As Integer
    For i = 1 To .Count
        Debug.WriteLine(.get_TextLine(i))
    Next
End With

The following C# sample prints the line in the control:

for (int i = 1; i <= axEdit1.Count; i++)
	System.Diagnostics.Debug.WriteLine(axEdit1.get_TextLine(i));

The following VFP sample prints the line in the control:

with thisform.Edit1.Object
	local i
	for i = 1 to .Count
		wait window nowait .TextLine(i)
	next
endwith