WinForm完成自界說右下角提醒後果的辦法。本站提示廣大學習愛好者:(WinForm完成自界說右下角提醒後果的辦法)文章只能為提供參考,不一定能成為您想要的結果。以下是WinForm完成自界說右下角提醒後果的辦法正文
本文實例講述了WinForm完成自界說右下角提醒後果的辦法。分享給年夜家供年夜家參考。詳細完成辦法以下:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace IcoFlickerApp { public partial class FrmMain : Form { public FrmMain() { InitializeComponent(); Rectangle rectangle = Screen.AllScreens[0].WorkingArea; this.StartPosition = FormStartPosition.Manual; this.Location = new Point(rectangle.Width - this.Width, rectangle.Height); this.TopMost = true; System.Threading.Thread thread = new System.Threading.Thread(() => { while (this.Top >= rectangle.Height - this.Height) { this.Invoke(new MethodInvoker(delegate { this.Top = this.Top - 1; System.Threading.Thread.Sleep(1); Application.DoEvents(); })); } }); thread.Start(); } } }
願望本文所述對年夜家的C#法式設計有所贊助。