I am trying to add somefading effects to a button, a picturebox and a text box, using Windows Forms.

I know I should use WPF for this, but I never worked with it and it's to complicated for me and my project is to advanced to switch platforms now.

I have this, but the opacity/fading effect isn't smooth at all.

```
public void Animation(Button button1) {
    var expandTimer = new System.Windows.Forms.Timer();
    var contractTimer = new System.Windows.Forms.Timer();
    expandTimer.Interval = 10;
    contractTimer.Interval = 10;
    DateTime animationStarted = DateTime.Now;
    TimeSpan animationDuration = TimeSpan.FromMilliseconds(250);
    int initialWidth = 75;
    int endWidth = 130;

    button1.MouseHover += (_, args) => {
        contractTimer.Stop();
        expandTimer.Start();
        animationStarted = DateTime.Now;
        button1.ForeColor = Color.DimGray;
    };

    button1.MouseLeave += (_, args) => {
        expandTimer.Stop();
        contractTimer.Start();
        animationStarted = DateTime.Now;
        button1.ForeColor = Color.Red;
    };

    expandTimer.Tick += (_, args) => {
        double percentComplete = (DateTime.Now - animationStarted).Ticks
                / (double)animationDuration.Ticks;
        button1.Visible = false;

        if (percentComplete >= 1) {
            expandTimer.Stop();

        } else {
            button1.Width = (int)(initialWidth +
                    (endWidth - initialWidth) * percentComplete);

        }
    };

    contractTimer.Tick += (_, args) => {
        double percentComplete = (DateTime.Now - animationStarted).Ticks
                / (double)animationDuration.Ticks;
        button1.Visible = true;

        if (percentComplete >= 1) {
            contractTimer.Stop();

        } else {
            button1.Width = (int)(endWidth -
                    (endWidth - initialWidth) * percentComplete);
        }
    };
}

```

How can I fix the not so smooth transitions without having to switch to WPF?