“VB中,仅当在文本框中选中一个英文字母时,置按钮command1有用...

发布网友

我来回答

1个回答

热心网友

呵呵,都是暨大的吗?我也是。不容易啊,哥们。我写好了,大家一起努力,加油!

VB中,仅当在文本框中选中一个英文字母时,置按钮command1有用
Private Sub Timer1_Timer()
s = (Text1.SelText)
If Len(s) = 1 And s >= "A" And s <= "z" Then Command1.Enabled = True
End Sub

单击按钮COMMAND1时,将选中的大(小)写字母替换为小(大)写字母
Private Sub Command1_Click()
s = (Text1.SelText)
If s >= "A" And s <= "Z" Then Text1.SelText = LCase(s)
If s >= "a" And s <= "z" Then Text1.SelText = UCase(s)
End Sub

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com