在一个容器里,使用Tab键会自动聚焦下一个TabStop属性为True的控件,且是按照TabIndex大小顺序聚焦。
如果一个该容器的控件已经聚焦完,继续按Tab键,则会自动跳转到下一个容器(按照容器的TabIndex顺序)的控件聚焦。容器的TabStop不起作用。

Enter键实现Tab键一样的效果,有两种方法:窗体的SelectNextControl方法、发送Tab命令。
注意不应该使用控件的Enter事件来去实现,这个Enter命名有点迷惑性,因为通过鼠标点击、以及自动聚焦都会触发Enter事件。
using System;using System.Windows.Forms;namespace WindowsFormsApp1{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } /// <summary> /// 不可取的方法 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void textBox1_Enter(object sender, EventArgs e) { // SendKeys.Send("{Tab}"); } private void textBox_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) { Control ctl; ......原文转载:http://www.shaoqun.com/a/822646.html
跨境电商:https://www.ikjzd.com/
1淘网:https://www.ikjzd.com/w/1698
东杰智能:https://www.ikjzd.com/w/1967
reverb:https://www.ikjzd.com/w/1273
在一个容器里,使用Tab键会自动聚焦下一个TabStop属性为True的控件,且是按照TabIndex大小顺序聚焦。如果一个该容器的控件已经聚焦完,继续按Tab键,则会自动跳转到下一个容器(按照容器的TabIndex顺序)的控件聚焦。容器的TabStop不起作用。Enter键实现Tab键一样的效果,有两种方法:窗体的SelectNextControl方法、发送Tab命令。注意不应该使用控件的Ent
史上最详细亚马逊运营Listing指导大全:https://www.ikjzd.com/tl/109370
Used Sold as New?我来帮你过:https://www.ikjzd.com/tl/109371
上海朱家角古镇门票 :http://www.30bags.com/a/412815.html
尴尬 老婆穿我内裤上班被同事嘲笑:http://lady.shaoqun.com/a/271563.html
宝宝让我蹭蹭好不好 乖宝贝我就放进去保证不动:http://lady.shaoqun.com/a/247499.html
老师把腿张大点我要进去 老师你夹得我好紧好爽:http://lady.shaoqun.com/m/a/247511.html
12岁女生被叔叔侵犯怀孕2年!孩子经常受伤,请不要低估人性的邪恶:http://lady.shaoqun.com/a/383269.html
玩转亚马逊Listing必看:https://www.ikjzd.com/tl/109372
啊你轻点 不玩啊 太大了 啊_口述阳台吃奶添下面:http://www.30bags.com/a/254306.html
人妻一边接电话一边被我干 人妻美妇疯狂迎合:http://lady.shaoqun.com/m/a/247062.html
禁止闪购!亚马逊印度和沃尔玛Flipkart将受到打击:https://www.ikjzd.com/articles/145939
侵权预警!!!亚马逊侵权到底指什么:https://www.ikjzd.com/articles/145937
没有评论:
发表评论