为什么我收到“Canvas 不允许绘图”消息 在 TeeChart ActiveX 5 组件中绘图时?
我正在将 Steema 的 TeeChart ActiveX 5 组件用于 .NET C# 中的应用程序。
我通过“Canvas
”使用 Line()
、Rectangle()
和 Circle()
方法进行一些绘图” 组件的属性。
我的绘图代码在组件的每个 OnBeforeDrawSeries()
和 OnAfterDraw()
事件上调用。
当只有几张图时,效果还不错。 但是,当绘图量增加并且重绘达到一定次数后,我会收到一个 MessageBox
,其中包含错误“Canvas 不允许绘图”,并且应用程序退出。
我相信这是由于绘图调用“超载”组件造成的。
我是否以错误的方式使用此功能,或者我可以将其视为组件中的 BUG 吗?
I'm using Steema's TeeChart ActiveX 5 component for an application in .NET C#.
I do some drawings using the methods Line()
, Rectangle()
and Circle()
through the "Canvas
" property of the component.
My code for drawing is called on every on every OnBeforeDrawSeries()
and OnAfterDraw()
events of the component.
When there is only a few drawings, it works ok. But when the amount of drawing increases and after a certain number of redraws, I get an MessageBox
with an error "Canvas does not allow drawing" and the application quits.
I believe this is somehow due to "overloading" the component with drawing calls.
Am I using this functionality the wrong way, or can I consider this a BUG in the component?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这是一个错误,因为我对该组件及其管理内存的方式也有类似的问题(不是 Canvas)。
在一些 RAM 量较小的机器上,当我们创建大量图形并显示它们时,我们将收到一个消息框,其中显示“没有足够的存储空间来处理此命令”。 一旦出现该框,就无法关闭该框,因为如果单击“确定”,该消息框会一次又一次地显示。 因此,您需要终止该应用程序才能使用它。 我认为该错误与绘图过程有关,因为当我们关闭消息框时,组件会尝试重新绘制显示消息框的区域,并且错误再次发生。
首先,您知道 TeeChart ActiveX 现在是版本 8。也许这个版本可以解决这个问题。
我还建议尝试 .NET 版本的 TeeChart。 根据我自己的经验,TeeChart .NET 不存在任何内存问题,因为内存是由 .NET 框架管理的。
I would consider this a bug because I have a similar problem (not with Canvas) with this component and the way it manages the memory.
On some machine with small amount of RAM, when we create a lot of graph and display them, we will receive a message box with this message "Not enough storage available to process this command". Once this box appears, it is impossible to close this box because if you click OK, the message box is displayed again and again. So, you need to kill the application to get ride of it. I think the bug is related to the drawing process because when we close the message box, the component tries to repaint the region where the message box was displayed and the error happens again.
First, you know that TeeChart ActiveX is now at version 8. Maybe this version resolve this issue.
I would suggest also to try the .NET version of TeeChart. From my own experience, TeeChart .NET does not have any memory problem since the memory is managed by the .NET framework.