宝莲灯沉戬同人文:VB(初级)问题请教:

来源:百度文库 编辑:中科新闻网 时间:2024/05/10 12:05:11
新建一个工程,文本框text1,使用户输入字母一律转换为大写显示(焦点在最右端)
UCase(Text1.Text)之后怎么做呢?
焦点在最右端!!!!呀
这是一个上机题 没有说用click事件
我先谢谢大家了
现在的问题是 焦点

Private Sub Text1_Change()
Text1.Text = UCase(Text1.Text)
Text1.SelStart = Len(Text1.Text)
Text1.SetFocus
End Sub

Private Sub Text1_Change()
Text1 = UCase(Text1)
End Sub

Private Sub Command1_Click()
Text1.Text = UCase(Text1.Text)
Text1.SelStart = Len(Text1.Text)
Text1.SetFocus

End Sub