'宣言 Public Delegate Sub AfterSpinEventHandler( _ ByVal sender As Object, _ ByVal e As AfterSpinEventArgs _ )
public delegate void AfterSpinEventHandler( object sender, AfterSpinEventArgs e )
Private Sub ultraCalendarCombo1_AfterSpin(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.AfterSpinEventArgs) Handles ultraCalendarCombo1.AfterSpin Dim direction As String = String.Empty Dim info As String = String.Empty ' Use the AfterSpinEventArgs' SpinDirection property ' to determine whether the up or down spin button was clicked If (e.SpinDirection = ScrollButton.Up) Then direction = " 'Up' " Else direction = " 'Down' " End If ' Output information about the event to the debugger info += "The" + direction + "button was clicked." + vbCrLf info += "The control's new value is " + Me.ultraCalendarCombo1.Value.ToString() System.Diagnostics.Debug.WriteLine(info) End Sub
private void ultraCalendarCombo1_AfterSpin(object sender, Infragistics.Win.UltraWinSchedule.AfterSpinEventArgs e) { string direction = string.Empty; string info = string.Empty; // Use the AfterSpinEventArgs' SpinDirection property // to determine whether the up or down spin button was clicked if ( e.SpinDirection == ScrollButton.Up ) direction = " 'Up' "; else direction = " 'Down' "; // Output information about the event to the debugger info += "The" + direction + "button was clicked." + "\n"; info += "The control's new value is " + this.ultraCalendarCombo1.Value.ToString(); System.Diagnostics.Debug.WriteLine( info ); }