Author Topic: Moving and resizing Windows Task bar  (Read 912 times)

Malic

  • Full Member
  • ***
  • Posts: 105
Moving and resizing Windows Task bar
« on: March 18, 2022, 05:16:41 AM »
Am trying to create something to get rid of an annoyance.  Computer has a mixture of HDMI and displayport, and when I turn the screens off for the night, the single display port "disconnects" and when I start it the next day, it resets the task bar.  Moving it back to the window I want it, it also has to be resized ( I keep it about 4 lines thick )

I tried to make a script that takes the mouse, moves it to it and then clicks and drags it to the other screen, but it, like sex panther, "60% of the time, it works every time" and the other times, it is just randomly clicking on things because it did not register part of the script.  Have tried to put in pauses, done the mouse movement smooth animation, etc.

Is there some easier way to just tell the task bar to move to a screen, assign to top, bottom, left, or right and then how many lines thick?

This is the normal day-to-day screen layout.  Screen 1 is the single display port, and it disconnects from windows when everything is powered down.  My task bar normally runs on screen 3, on the bottom, and is 4 lines thick.
When everything is turned back on, the task bar resets to the bottom of screen 1 and is 1 line thick


This is what Windows sees when the screens are off (captured using remote software)  This image is just a note, I have no issue with the placement of the task bar at this point.  Screen 1 on this is screen 2 on the above image, screen 2 is screen 3 on the above image, and screen 3 is screen 4.  It just gets rid of the screen that uses display port and reorganizes their order

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4786
  • RTFM
Re: Moving and resizing Windows Task bar
« Reply #1 on: March 18, 2022, 10:26:19 AM »
This seems to be a common issue with DisplayPort monitors. Some apparently have an option like "DP Hot-Plug Detection" which may disable that behavior.

Microsoft does not appear to have provided an API or documentation to manipulate the taskbar programmatically in this way.