

| Type | Description | |||
| SelStartLine as Variant | A long expression that indicates the index of the line where the selection starts. If the SelStartLine parameter is negative, the selection starts from the cursor position. | |||
| SelStartPos as Variant | A long expression that indicates the index of the character in the line where the selection starts. If the SelStartPos parameter is negative, the selection starts from the cursor position. | |||
| SelEndLine as Variant | A long expression that indicates the index of the line where the selection ends. If the SelEndLine parameter is negative the control selects the text to the end. | |||
| SelEndPos as Variant | A long expression that indicates the index of the character in the line where the selection ends. If the SelEndPos parameter is negative the control selects the text to the end. | 
The following VB sample selects the entire text in the control:
With Edit1
    .SetSelection 0, 0, -1, -1
End With
  The following VB sample selects the text from the caret position to the end:
With Edit1
    .SetSelection -1, -1, -1, -1
End With
  The following C++ sample selects the entire text in the control:
m_edit.SetSelection( COleVariant( (long)0 ), COleVariant( (long)0 ), COleVariant( (long)-1 ), COleVariant( (long)-1 ) );
The following VB.NET sample selects the entire text in the control:
With AxEdit1
    .SetSelection(0, 0, -1, -1)
End WithThe following C# sample selects the entire text in the control:
axEdit1.SetSelection(0, 0, -1, -1);
The following VFP sample selects the entire text in the control:
With thisform.Edit1
    .SetSelection(0, 0, -1, -1)
EndWith