When you delete the btnOrder_Click
you should also delete the following line in yourForm.Designer.cs
:
this.btnOrder.Click += new System.EventHandler(this.btnOrder_Click);
To find this line after you removed the btnOrder_Click
rebuild your project and then in the Error List window double click on error which says:
'WindowsFormsApplication1.Form1' does not contain a definition for 'btnOrder_Click' and no extension method 'btnOrder_Click' accepting a first argument of type 'WindowsFormsApplication1.Form1' could be found (are you missing a using directive or an assembly reference?)
By double clicking on this error you will redirect to that line and after deleting that line your form returns back.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…