property CalcEdit.SelText as String
Returns or sets the string containing the currently selected text.

TypeDescription
String A string expression that indicates the  current selection's text.
Returns the text that the user selected in a text-entry area of a control, or returns an empty string ("") if no characters are selected. Specifies the string containing the selected text. Not available at design time; read-write at run time. The SelStart property returns or sets the starting point of text selected; indicates the position of the insertion point if no text is selected. The SelLength property determines the lenght of the selected text. The control fires the SelChange event when the user changes the selection. Set the EvaluateSel property on False, to prevent evaluating the current selection

The following VB sample displays the selected text when the user changes it:

Private Sub CalcCalcEdit1_SelChange()
     Debug.Print CalcEdit1.SelText
End Sub

The following C++ sample displays the selected text when the user changes it:

void OnSelChangeCalcEdit1() 
{
	OutputDebugString( m_edit.GetSelText() );
}

The following VB.NET sample displays the selected text when the user changes it:

Private Sub AxCalcCalcEdit1_SelChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxCalcEdit1.SelChange
    With AxCalcEdit1
        Debug.WriteLine(.SelText)
    End With
End Sub

The following C# sample displays the selected text when the user changes it:

private void axCalcCalcEdit1_SelChange(object sender, EventArgs e)
{
	System.Diagnostics.Debug.WriteLine(axCalcEdit1.SelText);
}

The following VFP sample displays the selected text when the user changes it:

*** ActiveX Control Event ***

with thisform.CalcEdit1
	wait window nowait .SelText
endwith