By calling the API, you can animate the C # form, calling the User32.dll number of rows AnimateWindow
1. Functions affirm
[System.Runtime.InteropServices.DllImport ("user32")]
private static extern bool AnimateWindow (INTPTR hwnd, int dwtime, int dwFlags);
Handle to controls on the HWND interface
Dwtime duration of the form effect execution (in milliseconds)
DwFlags the value of a form effect
2, dwflags to pass the parameter is some type of int constant
const int aw_hor_positive = 0x0001; Front _ Horizontal Direction
const int aw_hor_negative = 0x0002;//Negative _ Horizontal direction
const int aw_ver_positive = 0x0004; Front _ Vertical Direction
const int aw_ver_negative = 0x0008;//Negative _ Vertical direction
const int Aw_center = 0x0010;//is expanded by the middle or is narrowed by the surrounding center
const int aw_hide = 0x10000; Hide Objects
const int aw_activate = 0x20000;//Display Object
const int aw_slide = 0x40000;//Pull Screen Slide effect
const int aw_blend = 0x80000;//fade Gradient effect
3, call, as long as the form of the Load event to add code, such as:
AnimateWindow (this. Handle, aw_blend);//fade-out gradient effect can be achieved
"C #" form animation effect