ABL 进展:如何让窗口在屏幕上与上次打开的位置相同的位置打开

发布于 2024-08-04 08:10:33 字数 337 浏览 4 评论 0原文

我们目前使用此逻辑将每个新窗口居中:

ASSIGN {&WINDOW-NAME}:X = (会话:宽度像素 - {&窗口名称}:宽度像素)/ 2 {&窗口名称}:Y = (SESSION:HEIGHT-PIXELS - {&WINDOW-NAME}:HEIGHT-PIXELS) / 2.

但是,用户希望将窗口定位在某个位置。当他们关闭窗口并稍后重新打开窗口时,他们希望它出现在他们离开的同一位置。

如果我删除上面的代码,新窗口会随机出现在屏幕上。

使用: 视窗XP 进度 Openedge 10.1C01

We currently use this logic to center every new window:

ASSIGN {&WINDOW-NAME}:X =
(SESSION:WIDTH-PIXELS - {&WINDOW-NAME}:WIDTH-PIXELS) / 2
{&WINDOW-NAME}:Y =
(SESSION:HEIGHT-PIXELS - {&WINDOW-NAME}:HEIGHT-PIXELS) / 2.

However, the user want to position the window in a certain place. When they close the window and reopen the window later, they want it to appear in the same place they left it.

If I remove the above code, the new window appears randomly on the screen.

Using:
Windows XP
Progress Openedge 10.1C01

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暖树树初阳… 2024-08-11 08:10:33

您需要记录 X &用户将其移动到的 Y 位置,并使用该信息在下次启动时在该位置重新打开它。

您可以记录关机时的位置,但这会导致异常关机时不记得的可能性。这可能是您想要的,也可能不是。

或者您可以检测移动并记录新位置。您可能想使用“鼠标上移”。

You need to record the X & Y position that the user moves it to and use that information to re-open it at that position the next time they start.

You could record the position at shutdown but that leaves the possibility of an abnormal shutdown not remembering. That might be what you want or it might not be.

Or you could detect moves and record the new position then. You'd probably want to use MOUSE-MOVE-UP.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文