Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Forms Designer, using a custom control that inherits GLControl crashes visual studio #30

Open
resHQ opened this issue Feb 10, 2020 · 0 comments

Comments

@resHQ
Copy link

resHQ commented Feb 10, 2020

encountered in visual studio 2019.

Forms designer actually calls the subscribed events when you do stuff like clicking, resizing the control that inherits/has a glcontrol.

To stop it from crashing:
make a private bool isInDesignMode = (LicenseManager.UsageMode == LicenseUsageMode.Designtime);

and then do a if(isInDesignMode) {return} check before any other logic, in the affected methods (examples are onResize, onPaint).

@resHQ resHQ changed the title Using a custom control that inherits GLControl, in designer crashes visual studio In Forms Designer, using a custom control that inherits GLControl crashes visual studio Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant