Windows API for moving a window to a specific monitor

試著忘記壹切 提交于 2019-12-23 02:59:07

问题


Suppose the computer has two monitors: Mon1 and Mon2. Notepad is on Mon2. I know the handle of its window. Can I move the window from Mon2 to Mon1 programmatically? What Windows API should I use? I have found the following candidates, but their documentation does not mention monitors.

SetWindowPos
SetWindowPlacement
MoveWindow

If anyone is interested in why I am trying to do this, this is because sometimes I need to move a window from Mon2 to Mon1 while the window is obscured by a full-screen always-on-top window or Mon2 is turned off.

来源:https://stackoverflow.com/questions/41531147/windows-api-for-moving-a-window-to-a-specific-monitor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!