现在的位置: 首页 > 综合 > 正文

类似MSN的右下角弹出窗体

2011年01月09日 ⁄ 综合 ⁄ 共 657字 ⁄ 字号 评论关闭
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里

抱歉!评论已关闭.