Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 MaskedTextBox,我想将 IBeam 光标放在框的末尾(或开头)。
例子:
- 用户在 MaskedTextBox 中单击并开始输入,但他需要“退格”,因为他单击了框的中间,如何将光标自动向左/向右移动?
MaskedTextBox“Cod IBGE”为“000”(需要 3 个数字)
您应该在 MaskedTextBox 上添加“Enter”事件,然后将以下代码设置为主页:
mtb.SelStart = 0; mtb.SelLength = 0;