event SelChange ()
Occurs when the user selects text in the control.

TypeDescription
Use the SelChange event to notify your application that the user changes the selection, or the cursor is moved to a new position. Use the SelText property to get the selected text. The SelStart and SelLenght properties determine the position of the selected text. Use the SelForeColor and SelBackColor properties to specify the colors for the selected text. Use the Change event to notify your application when the user alters the control's text. Use the CaretLine and CaretPos properties to determine the caret's position.

Syntax for SelChange event, /NET version, on:

private void SelChange(object sender)
{
}

Private Sub SelChange(ByVal sender As System.Object) Handles SelChange
End Sub

Syntax for SelChange event, /COM version, on:

private void SelChange(object sender, EventArgs e)
{
}

void OnSelChange()
{
}

void __fastcall SelChange(TObject *Sender)
{
}

procedure SelChange(ASender: TObject; );
begin
end;

procedure SelChange(sender: System.Object; e: System.EventArgs);
begin
end;

begin event SelChange()
end event SelChange

Private Sub SelChange(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelChange
End Sub

Private Sub SelChange()
End Sub

Private Sub SelChange()
End Sub

LPARAMETERS nop

PROCEDURE OnSelChange(oCalcEdit)
RETURN

Syntax for SelChange event, /COM version (others), on:

<SCRIPT EVENT="SelChange()" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function SelChange()
End Function
</SCRIPT>

Procedure OnComSelChange 
	Forward Send OnComSelChange 
End_Procedure

METHOD OCX_SelChange() CLASS MainDialog
RETURN NIL

void onEvent_SelChange()
{
}

function SelChange as v ()
end function

function nativeObject_SelChange()
return

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