编写了用于排列桌面窗口的代码

1作者: graycat9 个月前原帖
在计算机操作中,例如在微软Windows系统上,当有多个窗口(尤其是10个或更多)时,需要一种方法来有效地排列它们。 因此,我编写了一些代码来实现这一点。 简单来说,问题在于在日常工作中,一些窗口很容易被其他窗口完全覆盖。 例如,在我使用的Firefox浏览器版本中,如果我点击窗口A以打开一个新窗口B,Firefox会将B显示在窗口A的右下方;然后点击A会显示A,但会覆盖窗口B的左上角,甚至可能覆盖整个窗口B。 解决方案:基本思路是移动窗口,使所有窗口的左上角在屏幕上一条斜率从右上角到左下角的线上均匀分布。 [为了定义,如果窗口A覆盖了窗口B的部分或全部,那么在Z顺序中,A的层级高于B。可以把Z看作是一个与屏幕正交的坐标轴。] 这样,Z顺序中最上面的窗口位于左下角并且完全可见;我们至少可以看到每个窗口的左上角;如果点击某个窗口并更改Z顺序,那么该窗口将完全可见,并且我们仍然能看到每个窗口的左上角。 为了解决这个问题,我在Object Rexx 4.2.0中编写了代码,该版本允许找到窗口在Z顺序中的坐标并在保留Z顺序的情况下移动窗口。 我通过一个图标来调用这个解决方案,该图标位于屏幕的左上角,即一个几乎总是可见的位置。 其他人也可能会喜欢这个解决方案!
查看原文
In computing such as on Microsoft Windows, with several, especially 10 or more, windows (visible, not <i>minimized</i>) need a way to <i>arrange</i> them in a productive way.<p>So, wrote some code to do that.<p>In simple terms, the problem is that during routine work some windows too easily get completely covered by other windows.<p>E.g., with the version of the Firefox Web browser I have, if click on window A to open a new window B, Firefox displays B to the lower right of window A; then clicking on A shows A but covers the upper left and maybe all of window B.<p>Solution: The basic idea is to move the windows so that the upper left corners of all the windows are equally spaced on a line on the screen with slope from upper right to lower left.<p>[For a definition, if window A covers some or all of window B, then A is <i>higher</i> than B in the <i>Z-order</i>. Think of Z as a coordinate axis orthogonal to the screen.]<p>Then the window at the top of the Z-order is on the lower left and fully visible; we can see at least the upper left corner of each window; and if click on some window and change the <i>Z-order</i>, then that window becomes fully visible and we will still have at least the upper left corner of each window visible.<p>For this solution wrote the code in Object Rexx 4.2.0, which permits finding the coordinates of the windows in their Z-order and moving the windows preserving the Z-order.<p>I invoke this solution via an icon, right, in the upper left corner of the screen, i.e., in a position nearly always visible.<p>Others may also like this solution!