有两种方法:1、清空属性窗口中的双击事件(doubleclick )右边的内容;2.单击“发生错误”提示窗口的“否”后,再双击错误列表里的错误项,此时编辑窗口跳转为xx.Designer.cs,然后注释掉有波浪线的那一行代码。