wpf 窗口最小化后,触发某事件弹出最小化窗口并置顶

//如果窗口最小化了弹出并置顶----事件触发调用
                    ShowWindowAsync(new System.Windows.Interop.WindowInteropHelper(CommonHelper.view).Handle, 1);
                    SetForegroundWindow(new System.Windows.Interop.WindowInteropHelper(CommonHelper.view).Handle);

  

[System.Runtime.InteropServices.DllImport("User32.dll")]
        private static extern bool ShowWindowAsync(IntPtr hWnd, int cmdShow);
        [System.Runtime.InteropServices.DllImport("user32.dll")]
        private static extern int SetForegroundWindow(IntPtr hWnd);

  

posted @ 2014-09-29 10:54  红鲤鱼与驴与绿鲤鱼  阅读(1349)  评论(0编辑  收藏  举报