C# 帮我加个注释给你50分!

来源:百度知道 编辑:UC知道 时间:2024/09/26 13:40:38
下面是一个窗体控件屏幕边缘自动隐藏的方法 麻烦就大哥给个注释 要求是每行一个!注释 谢谢 每个30分钟进来一次 注释加好 立刻给分!注释越详细越好

private void timer1_Tick(object sender, EventArgs e)
{
if (WindowState != FormWindowState.Minimized)
{
int ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width; //屏幕宽度
int ScreenRight = Screen.PrimaryScreen.WorkingArea.Right; //屏幕高度
int MouseX = Control.MousePosition.X; //鼠标X位置
int MouseY = Control.MousePosition.Y;//鼠标垂直位置
if (this.Left < 0 && this.Top < 0)
{
this.Left = 0;
this.Top = 1;
}
if (this.Left >= ScreenWidth - this.Right && this.Top < 0) //如果自己的左边是否在屏幕的边缘
{
this.Left = ScreenWidth;
this.Top = 0;
}
if (t

private void timer1_Tick(object sender, EventArgs e) //时间控件(每当经过指定的时间间隔时发生)
{
timer1.Start();
if (WindowState != FormWindowState.Minimized) //判断当前窗体是否为最小化如果不就执行if里面的语句
{
int ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width; //屏幕宽度
int ScreenRight = Screen.PrimaryScreen.WorkingArea.Right; //屏幕高度
int MouseX = Control.MousePosition.X; //鼠标X位置
int MouseY = Control.MousePosition.Y;//鼠标垂直(y)位置
if (this.Left < 0 && this.Top < 0) //判断是否在左上角隐藏
{
this.Left = 0; //为隐藏就显示出来左为0
this.Top = 1; //y坐标为1
}
if (this.Left >= ScreenWidth - this.Right && this.Top < 0) //判断窗体是否在屏幕的边缘
{
this.Left = ScreenWidth; //左宽度有屏幕一样宽
this.Top =