Option Explicit On Option Strict On Imports System.ComponentModel Public Class Form1 Private TrackBar As New TrackBar Private NumericUpDown As New NumericUpDown Private ReverseTrackBar As ReverseTrackBar Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.TrackBar.Orientation = Orientation.Vertical Me.TrackBar.Location = New Point(10, 0) Me.TrackBar.Height = Me.ClientSize.Height Me.NumericUpDown.Location = New Point(60, 10) Me.NumericUpDown.Minimum = Me.TrackBar.Minimum Me.NumericUpDown.Maximum = Me.TrackBar.Maximum Me.Controls.AddRange({Me.TrackBar, Me.NumericUpDown}) Me.ReverseTrackBar = New ReverseTrackBar(Me.TrackBar) Me.NumericUpDown.DataBindings.Add(NameOf(Me.NumericUpDown.Value), Me.ReverseTrackBar, NameOf(Me.ReverseTrackBar.Value), False, DataSourceUpdateMode.OnPropertyChanged) Me.ReverseTrackBar.Value = 5 End Sub End Class Public Class ReverseTrackBar Implements INotifyPropertyChanged Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged Property TrackBar As TrackBar Property Value As Integer Get Return Me.TrackBar.Maximum - Me.TrackBar.Value End Get Set(value As Integer) Me.TrackBar.Value = Me.TrackBar.Maximum - value RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(NameOf(value))) End Set End Property Public Sub New(TrackBar As TrackBar) Me.TrackBar = TrackBar AddHandler Me.TrackBar.ValueChanged, AddressOf TrackBar_ValueChanged End Sub Private Sub TrackBar_ValueChanged(sender As Object, e As EventArgs) RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(NameOf(Value))) End Sub End Class