Error with tao SimpleOpenGlControl

痞子三分冷 提交于 2019-12-02 02:00:16
exwaiz

I am using Tao framework. After implementing OpenGL chart solution, I encounter those error. Every time I tried to close form, error occurred. After few times of debugging, I found the reason. The reason is like this. On my form closing, Draw function tried to use OpenGlControl object ONE MORE TIME. So I make condition to check the additional flag.

I solved my problem in this way:
In control's InitializeComponent(); I removed simpleOpenGlControl1 Initialization and then in control's Load() function, I have

isDesignMode = LicenseManager.UsageMode == LicenseUsageMode.Designtime;
if (!isDesignMode)
{
    // init simpleOpenGlControl1
}

Now when my control is used in a project, there is no simpleOpenGlControl1 in design mode to make problem!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!