关于SetForegroundWindow与BringWindowToTop
SetForegroundWindow与BringWindowToTop有什么不同,
前台窗口、活动窗口、顶层的TOP窗口三者有什么区别?
[解决办法]
功能类似,但有一点小区别
bringwindowtotop 如果窗口为顶层窗口,则该窗口被激活;如果窗口为子窗口,则相应的顶级
SetForegroundWindow 该函数将创建指定窗口的线程设置到前台,并且激活该窗口。键盘输入转向该窗口,并为用户改各种可视的记号。系统给创建前台窗口的线程分配的权限稍高于其他线程。
The BringWindowToTop function brings the specified window to the top of the Z order. If the window is a top-level window, it is activated. If the window is a child window, the top-level parent window associated with the child window is activated.
SetForegroundWindow 该函数将创建指定窗口的线程设置到前台,并且激活该窗口。键盘输入转向该窗口,并为用户改各种可视的记号。系统给创建前台窗口的线程分配的权限稍高于其他线程。
The SetForegroundWindow function puts the thread that created the specified window into the foreground and activates the window. Keyboard input is directed to the window, and various visual cues are changed for the user. The system assigns a slightly higher priority to the thread that created the foreground window than it does to other threads.