C#WinForm 窗体回车替换Tab
2024-10-19 14:48:19
/// <summary>
/// 回车切换控件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void FrmDataCheckRule_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar ==)
{
if ((ActiveControl is TextBoxX))
{
//textBoxX可多行操作时不跳转
if (!(ActiveControl as TextBoxX).Multiline)
System.Windows.Forms.SendKeys.Send("{tab}");
}
else
System.Windows.Forms.SendKeys.Send("{tab}"); // MessageBox.Show(ActiveControl.Name);
}
}
加代码前
this.KeyPreview = true;
最新文章
- Algorithm | Binary Search
- 做Adsense的一些经验
- java: system.gc()和垃圾回收机制finalize
- 关于android中线性布局的layout_gravity属性
- Ubuntu使用tcpdump工具
- PHP中的设计模式:单例模式(译)
- Linux Shell编程(10)——引用变量
- Redmine配置
- Sum Root to Leaf Numbers——LeetCode
- css中的7中属性选择器
- LoadImage()使用
- org.hibernate.MappingException: Could not determine type for: java.util.List, at table: user, for...
- SQL Server不能通过外部IP访问,解决方法
- Android Studio开发常见问题
- [HEOI2015]小Z的房间
- v4v7升级到androidx过程
- ArcGIS Server缓存清理
- Docker入门6------生产力工具rancher
- 发布webservice之后调用不通
- HNOI2017礼物