滚动箱(TSCrollbox)中的最大组件数量

发布于 2025-02-10 04:12:16 字数 546 浏览 1 评论 0原文

我已经开发了一个程序,该程序使用tscrollbox组件来生产“铁路布局”。该路线由许多小数字组成,每个图形都代表了单个轨道(根据铁路建模的想法)。

我注意到,对于很少的数字,该软件毫无问题地工作。但是,进行了各种调试测试,已经有3500个二进制文件,它开始以一种异常的方式行事,并且有5000件零件偶然崩溃了!

我想指定该软件的第一个版本是在“ Windows XP Professional”环境中使用“ Delphi 5 Professional”开发的。我认为问题是少量的RAM(最大3GB),这不允许您分配超过一定数量的零件,尽管有一个粗略的估计,我也许可以将至少16000件分配。

然后,我尝试修改软件以使其适应“ Windows 8.1 Professional X64”环境中的“ Delphi Xe2”,生成64位代码,但是上述问题仍然存在。

在这一点上,我想知道是否要在tscrollbox组件的可能限制中找到问题。是否可以在tscrollbox上放置最大数量的组件?如果是这样,是否有任何方法可以克服这个问题?

I have developed a program that uses a TScrollBox component to produce a "railway layout". This route is made up of many small figures, each of which represents a single segment of track (according to the idea of railway modeling).

I noticed that for quite small numbers, the software works without problems. But carrying out various debug tests, already with 3500 binaries, it starts to behave in an anomalous way, and with 5000 pieces the program crashes indecently!

I would like to specify that this first version of the software was developed with "Delphi 5 Professional", in the "Windows XP Professional" environment. I thought the problem was the small amount of RAM (3GB maximum), which does not allow you to allocate more than a certain number of pieces, although with a rough estimate I could perhaps have allocated at least 16000 pieces.

I then tried to modify the software to adapt it to "Delphi XE2", in the "Windows 8.1 Professional X64" environment, generating 64-bit code, but the problem described above still occurs.

At this point, I wonder if the problem is to be found in a possible limitation of the TScrollBox component. Is there a maximum number of components that can be placed on the TScrollBox? If so, is there any way to overcome this problem?

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

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

发布评论

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

评论(1

凉薄对峙 2025-02-17 04:12:16

这不是TSCrollbox的限制,而是OS本身的限制。

窗口管理器施加的基本限制是没有过程
可以创建10,000多个用户或GDI对象

因为您可能使用了TwinControl后代,因此您很可能要达到该限制。

It is not a limitation of the TScrollBox, but of the OS itself.

A basic limitation imposed by the window manager is that no process
can create more than 10,000 USER or GDI objects

Since probably you're using TWinControl descendants, it is most likely you're reaching that limit.

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