`

C#实现窗口从屏幕右下角升起效果

阅读更多

private void 帮助ToolStripMenuItem_Click(object sender, EventArgs e)
{
frmNotices f = new frmNotices();
Point p = new Point(Screen.PrimaryScreen.WorkingArea.Width-f.Width, Screen.PrimaryScreen.WorkingArea.Height);
f.PointToScreen(p);
f.Location = p;
f.Show();

for (int i = 0; i <= f.Height; i++)
{
f.Location = new Point(p.X, p.Y - i);
Thread.Sleep(10);
}
}

效果如下图所示:

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics