您的位置:首页 > 其它

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

2014-09-29 10:54 369 查看
//如果窗口最小化了弹出并置顶----事件触发调用
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);


  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: