项目场景:
c# 调起第三方应用程序,需要把第三方应用程序显示在屏幕最上方
[DllImport("user32.dll")]
public static extern bool SetWindowPos(IntPtr hWnd, int hWndlnsertAfter, int X, int Y, int cx, int cy, int Flags);
SetWindowPos(GetTopWindow(win), 0, 0, 0, 0, 0, 1 | 2 | 0x0040);
注意:hWnd必须是最顶层的窗口句柄