标签:
1、设置窗体TopMost属性
private DispatcherTimer timer; public Window1() { InitializeComponent(); Loaded += new RoutedEventHandler(Window1_Loaded); } void Window1_Loaded(object sender, RoutedEventArgs e) { timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(1); timer.Tick += timer1_Tick; timer.Start(); //.... //timer.Stop(); } private void timer1_Tick(object sender, EventArgs e) { //定时处理 this.TopMost = true; }
2、设置窗体Owner
WindowInteropHelper mianHanel = new WindowInteropHelper(MainWindow.Current); WindowInteropHelper vedioWin = new WindowInteropHelper(this); WindowInteropHelper FrameWin = new WindowInteropHelper(FrameWindow); FrameWin.Owner = IntPtr.Zero; mianHanel.Owner = vedioWin.Handle; vedioWin.Owner = FrameWin.Handle;
3、
标签:
原文地址:http://www.cnblogs.com/shenchao/p/5478559.html