---
title: "C#，代码，移动窗体"
author: "flon"
date: "2008-09-15T11:04:00Z"
tags: []
slug: "c"
draft: false
lastmod: "2014-10-31T13:42:45Z"
id: 2150095
url: "https://flon.iteye.com/blog/2150095"
---

移动窗体

Screen p;

p = Screen.AllScreens\[0];  
this.Top = p.WorkingArea.Height - 5;  
this.Height = 1;  
int i;  
for (i = 0; i &lt; 120; i++)  
{  
Thread.Sleep(5);  
if (this.Height &gt;= 360)  
{

}  
else  
{  
this.Left = p.WorkingArea.Width - this.Width;  
this.Top = this.Top - 3;  
this.Height = this.Height + 3;  
this.Show();  
this.Refresh();  
Thread.Sleep(5);  
}  
}