c# - MenuStrip 和 ToolStrip 上的 "Red Cross"问题

标签 c# multithreading toolstrip menustrip

我有一个软件在许多机器上运行良好,虽然在一台机器上偶尔会出现问题,MenuStrip 和 ToolStrip 都显示为空白的白色背景,上面有一个红叉,因为如果您创建了一个空对象,则自定义控件会。这在我调试时并没有发生,我不知道如何使问题再次发生,但它确实发生了。我想知道是否有人知道可能是什么问题?

会不会是.NET框架的版本?

谢谢

最佳答案

当出现 GDI+ 问题(“The Red X of Death”)时,这种情况很常见。您是否在 OnPaint 中进行任何自定义绘图?或者可能有图形资源或字形已损坏或处理不当。

编辑:我重新阅读了您的问题。你似乎只在其中一台机器上有这个。我为此在谷歌上搜索了一下,我偶然发现了 this old thread .底部的帖子表明关闭虚拟内存可能存在问题:

We did manage to solve this - we were seeing the problem on a device running XP embedded. The XPe image developer had turned off Virtual Memory and as soon as we turned it on the problem went away. I believe it is just a symptom of the system running out of memory to display the graphics (maybe particularly if you use a lot of double buffering)

希望对您有所帮助。

关于c# - MenuStrip 和 ToolStrip 上的 "Red Cross"问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1000052/

相关文章:

c# - 如何为提及和主题标签修复此正则表达式?

java - 在开始测量性能之前预热代码

multithreading - RMI线程由于java.lang.OutOfMemoryError : Java heap space而终止

c# - 我们如何在单击菜单条项目时突出显示事件菜单项?

c# - AllowDrop 属性不适用于 ToolStripItems

c# - 为什么我的水平工具条一直垂直堆叠?

c# - Linq2Sql 包含

c# - c#中的最大容量集合

c# - 带有 retrofit 的多部分内容

.NET Thread.Sleep() 随机不精确