1、新建一個窗體程序,添加一個Timer以及設置它可用並綁定事件。
2、設置窗體的TopMost屬性為True
3、然后設置代碼如下即可實現
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms;namespace jiyi { public partial class Form1 : Form {public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void timer1_Tick(object sender, EventArgs e) {
this.TopMost = false; this.BringToFront();
this.TopMost = true; } } }