How to programmatically move Windows taskbar?

前端 未结 6 683
无人及你
无人及你 2021-02-06 23:32

I\'d like to know any sort of API or workaround (e.g., script or registry) to move (or resize) Windows taskbar to another position including another monitor (if dual monitors).

6条回答
  •  执笔经年
    2021-02-07 00:03

    The taskbar is a window. Use SetWindowPos() to move it. See also SHAppBarMessage() and ABM_WINDOWPOSCHANGED.

    Though the taskbar may be special and Windows may not like you moving it around. There are a lot of special cases in the Shell appbar API implementation for the taskbar.

    To move to another monitor, use EnumDisplayMonitors() with GetMonitorInfo(). Some monitors may have negative coordinates.

提交回复
热议问题