我们需要定时激活窗体,并把窗体声明为最上方
var timer2 = new DispatcherTimer(); timer2.Interval = TimeSpan.FromSeconds(5); timer2.Tick += new EventHandler(delegate(Object o, EventArgs a) { this.Topmost = false; this.Activate(); this.Topmost = true; }); timer2.Start();
我们需要定时激活窗体,并把窗体声明为最上方
var timer2 = new DispatcherTimer(); timer2.Interval = TimeSpan.FromSeconds(5); timer2.Tick += new EventHandler(delegate(Object o, EventArgs a) { this.Topmost = false; this.Activate(); this.Topmost = true; }); timer2.Start();