掩盖文本框时出现问题 [英] Problem inMasking TextBox

查看:95
本文介绍了掩盖文本框时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我掩盖了一个textBox.但是当我运行应用程序并打开窗体时,我的光标在文本框中被掩盖的区域之后闪烁,并且我必须将光标设置在第一个字符处.
谁能告诉解决方案,当我打开表单时,光标位于初始点.

Hi I mask A textBox.But when i run the application and Open the form My cursor is blinking after the masked area in textbox and i have to set the cursor at first character.
Can any one tell the solution that when i open the form my cursor is at initial point.

推荐答案

假设您使用的是标准MaskedTextBox:
Assuming you are using a standard MaskedTextBox:
maskedTextBox1.Select(0, 0);


使用Focus方法.

就像您希望光标选择一个文本框,然后编写TextBox1.Focus().
Use Focus method.

Like if you want your cursor should select a textbox then write TextBox1.Focus().


这篇关于掩盖文本框时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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