mdi 子表单无法通过 .NET 中的 opengl 应用程序工作

发布于 2024-09-29 11:32:30 字数 284 浏览 0 评论 0原文

这是我的第一个问题。 我开始通过Tao Framework 使用opengl 进行计算机图形编程。

一切都很顺利,但今天我尝试使用 MDI 表单。我的应用程序崩溃了。描述我的问题有点困难。所以我拍了 5 张图片,并在上面添加了我的问题。由于我的声誉,我无法添加此图像。这是我的主页链接。谢谢。

请阅读所有详细信息

http://www.emrekiyak.com/tao.html

This is my first question.
I start to computer graphics programming with opengl via Tao Framework.

Everything going well but today I tried to work with MDI forms. My application crashed. It is a bit difficult to describe my problem. So I captured 5 images and I added my questions on them. I could not add this images because of my reputation. This is my homepage link. Thank you.

Please read all details

http://www.emrekiyak.com/tao.html

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

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

发布评论

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

评论(1

顾北清歌寒 2024-10-06 11:32:30

我相信您将 MyParentForm 属性设置为表单本身,这会创建循环引用。

您可以参数化子窗体构造函数以携带对父窗体的引用,这将允许您正确设置它。

public ChildForm(Form parentForm)
{
    //Other code
    MdiParent = parentForm;
    Show();
}

无需将其作为财产保留在其他地方。

I believe you are setting the MyParentForm property as the form itself, which creates a circular reference.

You could parametrize the child form Constructor to carry a reference to the parent, which will allow you to properly set it.

public ChildForm(Form parentForm)
{
    //Other code
    MdiParent = parentForm;
    Show();
}

No need to keep it as a property elsewhere.

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