窗體特效,,左右移動

 

     private void timer1_Tick(object sender, EventArgs e)
        {
            int ScreenWidth = SystemInformation.PrimaryMonitorMaximizedWindowSize.Width;
            int ScreenHeight = SystemInformation.PrimaryMonitorMaximizedWindowSize.Height;
            Point MyPos = new Point(this.DesktopLocation.X, this.DesktopLocation.Y);
            if (MyPos.X + Width < ScreenWidth)
            {
                this.DesktopLocation = new Point(MyPos.X + 1, MyPos.Y);
            }
            else
            {
                this.DesktopLocation = new Point(0, MyPos.Y);
            }

        }

 

 

 

發佈了29 篇原創文章 · 獲贊 41 · 訪問量 37萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章