如何使用仅属性将按钮设置为Vb.Net中的默认按钮 [英] How To Make A Button As A Default Button In Vb.Net Using Property Only

查看:89
本文介绍了如何使用仅属性将按钮设置为Vb.Net中的默认按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的表单中有很多控件,我想让一个可聚焦的按钮作为默认按钮。当我按下输入时,光标转到下一个按钮并到达最后一个然后它应该转到那个按钮而不是通过编码使用属性

解决方案

< blockquote>为此,您可以使用 Form.AcceptButton 属性。这里给出一个例子



http://msdn.microsoft.com/en-us/library/system.windows.forms.form.acceptbutton.aspx [ ^ ]


使用AcceptButton属性,它将是表单中的默认选择按钮。



AcceptButton: - ButtonName


in my form there are many controls are there and i want to make focusable one button as a default button. when i am pressing enter at that time cursor goes to next button and reaches at the last then it should be go to that one button not by coding with the use of property

解决方案

You can use Form.AcceptButton property for this purpose. An example is given here

http://msdn.microsoft.com/en-us/library/system.windows.forms.form.acceptbutton.aspx[^]


Using The AcceptButton Property, it will be default selected button in the form.

AcceptButton:- ButtonName


这篇关于如何使用仅属性将按钮设置为Vb.Net中的默认按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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