类似MSN的右下角弹出窗体
this.Location = new System.Drawing.Point(Screen.PrimaryScreen.Bounds.Width - this.Width, Screen.PrimaryScreen.Bounds.Height - 100);
for (int i = 0; i < Screen.PrimaryScreen.Bounds.Height; i++)
{
this.Show();
for (int j = 0; j < 1000000; j++) ;
this.Location = new System.Drawing.Point(this.Location.X, Screen.PrimaryScreen.Bounds.Height - i);
this.Show();
if (i == this.Height + 30)
{
for (int k = 0; k < this.Height; k++)
{
for (int j = 0; j < 10000000; j++) ;
this.Location = new System.Drawing.Point(this.Location.X, this.Location.Y + k);
}
this.Close();
break;
}
}
直接放在Form_Load里
for (int i = 0; i < Screen.PrimaryScreen.Bounds.Height; i++)
{
this.Show();
for (int j = 0; j < 1000000; j++) ;
this.Location = new System.Drawing.Point(this.Location.X, Screen.PrimaryScreen.Bounds.Height - i);
this.Show();
if (i == this.Height + 30)
{
for (int k = 0; k < this.Height; k++)
{
for (int j = 0; j < 10000000; j++) ;
this.Location = new System.Drawing.Point(this.Location.X, this.Location.Y + k);
}
this.Close();
break;
}
}