@Niya: I think you mixed up the argument order for the bottomBrush:
Code:
'Original code
    Dim topBrush As New System.Drawing.Drawing2D.LinearGradientBrush(topRect, topColor, middleColor, 90)
    Dim bottomBrush As New System.Drawing.Drawing2D.LinearGradientBrush(bottomRect, color, middleColor, 90)
Shouldn't it be:
Code:
    Dim topBrush As New System.Drawing.Drawing2D.LinearGradientBrush(topRect, topColor, middleColor, 90)
    Dim bottomBrush As New System.Drawing.Drawing2D.LinearGradientBrush(bottomRect, middleColor, color, 90)
So you get a smooth transition all the way down instead of that very sharp line in the middle?