Winform应用程序中的默认按钮属性 [英] Default button property in winform app

查看:116
本文介绍了Winform应用程序中的默认按钮属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个接受用户输入的表单,然后让用户连接到sql服务器. 这是在单击按钮时发生的.但是我可以在哪里设置属性默认"按钮,以便用户在单击Enter时可以执行该按钮的工作.

I have a form that takes user input and then let the user get connected to the sql server. This is happening on button click.But where can I set the property Default button so that the user when clicks enter do the work of that button.

推荐答案

现在在表单上称为AcceptButton;将其设置为将成为默认按钮的按钮.
请参考表单.AcceptButton属性

It is called AcceptButton now on the form; set that to the button that will be the default button.
Refer to Form.AcceptButton Property

这篇关于Winform应用程序中的默认按钮属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆