Reputation: 73
I am getting this error when i open the design of a Winform.
Message 1244 The designer cannot process the code at line 108: this.cancelButton.DialogResult = DialogResult.Cancel; The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.
But when either i remove this piece of code from the designer.cs or change it to
this.cancelButton.DialogResult = System.windows.Forms.DialogResult.Cancel;
it works. My problem is i have this problem at almost all the winforms over a solution at many places. How can i resolve this issue to all places? Any way?
Upvotes: 3
Views: 5225
Reputation: 4828
Advice from @zespri and @bansi are some good pieces, but you are suggested to do all customized construct time design in your constructor, after InitializeComponent()
.
Upvotes: 4