星空网 > 软件开发 > ASP.net

通过设置窗体的AcceptButton属性,可以设置窗体的“接受”按钮,若此设计,则用户每次按下Enter键都相当于单击该按钮

 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Text; 7 using System.Windows.Forms; 8  9 namespace Test0210 {11   public partial class Form1 : Form12   {13     public Form1()14     {15       InitializeComponent();16     }17 18     private void Form1_Load(object sender, EventArgs e)19     {20       this.AcceptButton = button1;21     }22 23     private void button1_Click(object sender, EventArgs e)24     {25       MessageBox.Show("引发了接受按钮");26     }27   }28 }

 




原标题:通过设置窗体的AcceptButton属性,可以设置窗体的“接受”按钮,若此设计,则用户每次按下Enter键都相当于单击该按钮

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

汇丰银行开户材料:详细指南及所需必备材料 :https://www.kjdsnews.com/a/1836841.html
探讨离岸开设个人账户的利与弊 :https://www.kjdsnews.com/a/1836842.html
花旗银行在香港可以申请办理银行卡吗? :https://www.kjdsnews.com/a/1836843.html
美国参议院计划修改TikTok剥离提案:https://www.kjdsnews.com/a/1836844.html
美国参议院计划修改TikTok剥离提案:https://www.goluckyvip.com/news/191224.html
榔梨街道到高铁站 榔梨街道到高铁站多远:https://www.vstour.cn/a/373183.html
皇家游轮航线 皇家邮轮旅游攻略:https://www.vstour.cn/a/408245.html
2017春节旅游攻略有吗:https://www.vstour.cn/a/408246.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流