event Change ()
Occurs when the value of the control is changed.

 TypeDescription 
Use the Change event to notify your application when the control's Value/ValueF is changed. The Value property of the control specifies the value of the control. Use the Minimum/MinimumF and Maximum/MaximumF properties to specify the range's value. The control fires Changing event just before changing the control's value. Use the Caption property to put a HTML text on any part of the control.

Syntax for Change event, /NET version, on:

private void Change(object sender)
{
}

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

Syntax for Change event, /COM version, on:

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

void OnChange()
{
}

void __fastcall Change(TObject *Sender)
{
}

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

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

begin event Change()
end event Change

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

Private Sub Change()
End Sub

Private Sub Change()
End Sub

LPARAMETERS nop

PROCEDURE OnChange(oSlider)
RETURN

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

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

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

Procedure OnComChange 
	Forward Send OnComChange 
End_Procedure

METHOD OCX_Change() CLASS MainDialog
RETURN NIL

void onEvent_Change()
{
}

function Change as v ()
end function

function nativeObject_Change()
return

For instance, the following VB sample prints the control's Value on the control's thumb:

Private Sub Slider1_Change()
    With Slider1
        .Caption(exThumbPart) = .Value
    End With
End Sub

The following C++ sample prints the control's Value on the control's thumb:

void OnChangeSlider1() 
{
	CString strFormat;
	strFormat.Format( _T("%i"), m_slider.GetValue() );
	m_slider.SetCaption( 256, strFormat );
}

The following VB.NET sample prints the control's Value on the control's thumb:

With AxSlider1
    .set_Caption(EXSLIDERLib.PartEnum.exThumbPart, .Value.ToString())
End With

The following C# sample prints the control's Value on the control's thumb:

private void axSlider1_Change(object sender, EventArgs e)
{
    axSlider1.set_Caption(EXSLIDERLib.PartEnum.exThumbPart, axSlider1.Value.ToString());
}

The following VFP sample prints the control's Value on the control's thumb:

*** ActiveX Control Event ***

with thisform.Slider1
	.Caption(256) = .Value
endwith

 


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.