08 2011 档案

摘要:我们做Winform的时候,很多时候验证用户的输入的时候,对有出错的就使用一个MessageBox来提示,这样要强制用户确认,用户体验不好,使用ErrorProvider时,又不够明显,在些我们可以使用Tooltip提示工具,把Tooltip设置为气泡显示状态,提示效果相当不做。具体代码如下: private void textBox1_TextChanged(object sender, EventArgs e) { if (textBox1.Text.Length > 5) { ////toolTip1.Hide(textBox1); toolTip1.RemoveAll(); to 阅读全文
posted @ 2011-08-27 15:45 Lance Yang 阅读(247) 评论(0) 推荐(0) 编辑
摘要:protected override bool ProcessDialogKey(Keys keyData) { //实现回车跳到下一控件 if ((ActiveControl is TextBox || ActiveControl is ComboBox || ActiveControl is DateTimePicker) && keyData == Keys.Enter) { keyData = Keys.Tab; } return base.ProcessDialogKey(keyData); } 阅读全文
posted @ 2011-08-10 21:06 Lance Yang 阅读(369) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示