Hi!
It’s happened that some of the EventHandler delegates just disappeared from (auto generated) code. As a result the application is insensitive to some actions (button clicks, entering fields etc.).
Does anybody know why EventHandler delegates can disappear
Thanks in advance.

VS 2005 (Team Ed. for SD) C# disappearing of eventhandler delegates
5spot
AFT:
Sorry for the delayed response. I will report this to the product team. If you experience this problem in the future, and especially if you can reproduce it, please go to the MSDN Product Feedback Center and file a bug. http://lab.msdn.microsoft.com/ProductFeedback/Default.aspx
Thanks for taking the time to report this problem.
Michael Blome Visual C# Documentation Team
carlosm
Hi Michael!
It seems to me I should explain more details:
- if I created a button (for ex.) the following is generated:
...........
this.button1.Click += new System.EventHandler(this.button1_Click);
.............
private void button1_Click(object sender, EventArgs e){}
Sometimes the first part, namely: "this.button1.Click += new System.EventHandler(this.button1_Click);" disappears and application can not respond a Click event. As far as the delegate func. is concerned, it is not disappeared. So, if you want to "reactivate" the Click event you double-click inside Designer's property list for this event. The designer creates a new event handler and delegate named as before but extended with _1. Then you go back to the property list in the designer and remove the tail _1 from the end of the eventhandler name. Double-click and the designer find now you old and forgotten delegate function: button1_Click (a new one: button1_Click_1 is removed automatically).
Unfortunately I can not reproduce this myself when I want to get it but anyway it is happened (very seldom) it selves.
My ordinary development procedure is:
-1 carries out with development and testing of the application in a debug-mode
-2 save it by the Source safe
-3 rebuild it with a release-mode
-4 install on the test server
-5 and again rebuild it with a debug-mode (i.e. go to step 1).
Best regards, AFT
chaboy
AFT:
I have notified the Windows Forms product group about your issue.
nwr
Hi Michael!
Thanks for your attention.
Now, it seems to me, that the described problem is due to I have to manage a big (more than 15000 lines) spaghetti code ( code with “forms” not split into “forms.Designer.cs” and “forms[Designer].cs” / “forms.cs” after conversion from VS2003 to VS2005: see “VS2005 Hidden Designer code”
on the forum).Regards
AFT
Daye Rev
AFT:
I haven't heard of this issue. Can you provide the specific steps to reproduce this problem
Michael Blome - Visual C# Documentation Team