十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
String的成员函数中就有 ToUpper() 和 ToLower()啊
创新互联始终坚持【策划先行,效果至上】的经营理念,通过多达10多年累计超上千家客户的网站建设总结了一套系统有效的推广解决方案,现已广泛运用于各行各业的客户,其中包括:阳台护栏等企业,备受客户称誉。
Dim a As String = "abcEd"
Dim b As String = a.ToUpper() //大写
Dim c As String = a.ToLower() //小写
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress e.KeyChar 使用参数e来控制输入字符 End Sub 追问: 能给出大小写切换程序的整段 源代码 吗 回答: 我不明白你的大小写切换程序是要实现什么功能 是输入 大写 变小写吗? 追问: 是的 回答: If e.KeyChar.IsLower(e.KeyChar) = True Then e.KeyChar.ToUpper(e.KeyChar) 或 If e.KeyChar.IsUpper(e.KeyChar) = True Then e.KeyChar.ToLower(e.KeyChar)
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim s As String = "0Ff0ajkh04624F"
Dim i As Integer = 0
Dim sTemp As String = ""
Dim ss As String = ""
For i = 1 To Strings.Len(s)
sTemp = Mid(s, i, 1)
If Asc(sTemp) = 65 And Asc(sTemp) = 90 Then
sTemp = LCase(sTemp)
ElseIf Asc(sTemp) = 95 And Asc(sTemp) = 122 Then
sTemp = UCase(sTemp)
Else
sTemp = sTemp
End If
ss = ss sTemp
Next
MsgBox(ss)
End Sub