C#模拟MSN窗体抖动
窗体抖动...仿MSN.............
int formwinL = this.Left;
int formwinT = this.Top;
Random randomx = new Random();
for (int i = 0; i < 100; i++)
{
int x = randomx.Next(i+2-1);
int y = randomx.Next(i+2-1);
if (x % 2 == 0)
{
this.Left = this.Left + x;
}
else
{
this.Left = this.Left - x;
}
if (y % 2 == 0)
{
this.Top = this.Top + y;
}
else
{
this.Top = this.Top - y;
}
this.Left = formwinL; //还原原始窗体原始位置.
this.Top = formwinT; //还原原始窗体原如位置.
}