Perhaps this could be what you seek.
https://dsforums.net/t/programming-of-side-windows-min-and-max-position/654?u=dsjay