Take the 2-minute tour ×

I create a form and I want to resize it with animation like fade effect or anything else? for example I resize my form with this code and it show with an effect?

this.Size = new System.Drawing.Size(300, 300);


share|improve this question
Winform is not very efficient in animation. Can you move to WPF? –  Steve B Jul 25 '12 at 16:00
you can see this tuts?link Windows APIs called AnimateWindow –  Mostafa Rostami Jul 25 '12 at 17:19
I didn't say you can't. I said it's difficult versus WPF which is written to be animated –  Steve B Jul 25 '12 at 17:37

1 Answer 1

WinForms is not built with animations in mind.

I spent considerable time trying to smoothly animate WinForms apps prior to WPF. It's very hard and the result is almost always less than what you hope for.

The following tutorial shows how to create a splash screen with transparency. You can apply that logic to your form:


If at all possible, consider embedding WPF controls in your WinForms application where you need such effects.


share|improve this answer
but in this article <br/> C# Form Animation with Windows API <br/> codeproject.com/Articles/17099/… <br/> i want use this animation in resizing –  Mostafa Rostami Jul 25 '12 at 17:18
You can't do what they do in the article and just add animation. The AnimateWindow API provides a very specific set of animations. Note also the comment that says Note that this function does not work correctly on windows vista/7 with the aero theme enabled. Almost all modern PC's have the Aero theme enabled. If you want good animations WPF is the way to go. The call to AnimateWindow blocks, meaning your code doesn't run while AnimateWindow is running. You can't do anything to resize the window until AnimateWindow is done. –  Eric J. Jul 25 '12 at 17:40

Your Answer


