Use the ValueChanged event instead.
Set the TrackBar.Minimum to the smallest size of the Button, set the Maximum to the largest.
In the ValueChanged Event:
private void myTrackBar_ValueChanged(object sender, EventArgs e)
{
TrackBar tb = sender as TrackBar;
if (tb != null)
{
myBubuttonToResize.Width = tb.Value;
}
}
[edit]Missed the VB bit! - OriginalGriff[/edit]
Private Sub myTrackBar_ValueChanged(sender As Object, e As EventArgs)
Dim tb As TrackBar = TryCast(sender, TrackBar)
If tb IsNot Nothing Then
myBubuttonToResize.Width = tb.Value
End If
End Sub