Answered by:
Visual Studio crashes when trying to design forms - solved!

Question
-
Hi All,
Place this code:
C#:
if (DesignMode) return;
VB.net:
If DesignMode Then Return
on the first line of all your load event handlers for forms and controls.
Good luck,
Mac
- Edited by Mac McRae Saturday, April 12, 2014 1:57 PM
Saturday, April 12, 2014 1:53 PM
Answers
-
Hi,
Based on the title of this tread, it seems that you resolved your issue, right? The following is your solution, right?
Place this code:
C#:
if (DesignMode) return;
VB.net:
If DesignMode Then Return
on the first line of all your load event handlers for forms and controls.
If yes, please post a new reply including the solution in this thread so that we can mark it as answer to close this thread.
If I have misunderstood anything, please feel free to let me know.
PS: Because Mac did not reponse here, I will mark my reply including a possible solution as answer to close this thread.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
- Proposed as answer by Amanda Zhu Friday, April 18, 2014 1:46 AM
- Edited by Amanda Zhu Friday, April 18, 2014 9:38 AM edit
- Marked as answer by Amanda Zhu Friday, April 18, 2014 9:39 AM
Monday, April 14, 2014 5:22 AM
All replies
-
Hey Mac,
Why Visual Studio will crash ??? when u put the code
if (DesignMode)
return;
it will never crash neither in compile time and nor in runtime as the code will not get executed during the compile time and runtime the condition is always false
Regards
Rajesh Sajjanar
Saturday, April 12, 2014 3:39 PM -
Hi,
Based on the title of this tread, it seems that you resolved your issue, right? The following is your solution, right?
Place this code:
C#:
if (DesignMode) return;
VB.net:
If DesignMode Then Return
on the first line of all your load event handlers for forms and controls.
If yes, please post a new reply including the solution in this thread so that we can mark it as answer to close this thread.
If I have misunderstood anything, please feel free to let me know.
PS: Because Mac did not reponse here, I will mark my reply including a possible solution as answer to close this thread.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
- Proposed as answer by Amanda Zhu Friday, April 18, 2014 1:46 AM
- Edited by Amanda Zhu Friday, April 18, 2014 9:38 AM edit
- Marked as answer by Amanda Zhu Friday, April 18, 2014 9:39 AM
Monday, April 14, 2014 5:22 AM