Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我无法将 bunifu 按钮添加为表单的接受按钮。我有这个错误。表单的属性没有接受按钮选项。所以我正在尝试以编程方式进行。谢谢!。
您可以通过使用as关键字来实现这种类型转换。 您也可以通过跳过关键字this.AcceptButton = btnLogin as System.Windows.Forms.IButtonControl; 来简化代码。this
as
this.AcceptButton = btnLogin as System.Windows.Forms.IButtonControl;
this