You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Visual Studio 2022 WinForms项目中按钮点击事件缺失定义错误的解决求助

Visual Studio 2022 WinForms项目中按钮点击事件缺失定义错误的解决求助

我在Visual Studio 2022里维护一个WinForms项目,最近想实现一个功能:用户点击按钮时,往数据库里新增一行数据。但每次运行都会弹出这个错误:

'Form1' does not contain a definition for 'button1_Click' and no accessible extension method 'button1_Click' accepting a first argument of type 'Form1' could be found.

错误描述

有没有大佬能告诉我该怎么解决这个问题呀?

备注:内容来源于stack exchange,提问作者Jerry

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.15 15:08:15