VB如何转换大小写!!!??
发布网友
发布时间:2024-07-03 07:24
我来回答
共2个回答
热心网友
时间:2024-07-17 03:47
Private Sub Command1_Click()
Dim C As String
Dim S As String
Dim I As Integer
Text13.Text = ""
For I = 1 To Len(Text12.Text)
C = Mid(Text12.Text, I, 1)
If C <> " " Then
Select Case C
Case "0"
S = "零"
Case "1"
S = "壹"
Case "2"
S = "贰"
Case "3"
S = "叁"
Case "4"
S = "肆"
Case "5"
S = "伍"
Case "6"
S = "陆"
Case "7"
S = "柒"
Case "8"
S = "捌"
Case "9"
S = "玖"
Case Else
S = " "
End Select
Text13.Text = Text13.Text & S & " "
Else
S = " "
End If
Next I
End Sub
热心网友
时间:2024-07-17 03:44
Private Sub Command1_Click()
Dim X As String
X = Str(Text12.Text)
X = Replace(X, "1", Space(5) & "壹")
X = Replace(X, "2", Space(5) & "贰")
X = Replace(X, "3", Space(5) & "叁")
X = Replace(X, "4", Space(5) & "肆")
X = Replace(X, "5", Space(5) & "伍")
X = Replace(X, "6", Space(5) & "陆")
X = Replace(X, "7", Space(5) & "柒")
X = Replace(X, "8", Space(5) & "捌")
X = Replace(X, "9", Space(5) & "玖")
X = Replace(X, "0", Space(5) & "零")
Text13.Text = X
End Sub
Replace(x,a,b)函数指的是将字符串x中的a替换为b。Space(n)函数指的是空n格
vb编写程序对输入字符串进行大小写转换。
Private Sub Command1_Click()Cls x = InputBox("")Picture1.Print UCase(x) '大写 Picture1.Print LCase(x) '小写 End Sub
如何用VB实现大小写的转换
转换为小写:LCase 转换为大写:UCase
怎么实现在vb中,金额大小写转换啊?
Rmbda As String, Expda As String, Lent As Integer, Ntyp As Integer, Icnt As Integer, i As Integer, Trmb As StringRmb = Format(Rmb, "###0.00")If Rmb > 999999999999.99 ThenRMBChinese = "需转换的金额整数长度超过了12位!"...
vb大小写转换
下面是应用Lcase函数 进行大小写转换:Private Sub Command1_Click()Dim X As String Dim I As Long Dim S As String Dim CH As String //定义输入输出量X = Text1.Text For I = 1 To Len(X) CH = Mid(X, I, 1)If CH >= "a " And CH <= "z" Then S = S + UCas...
vb大小写字母转换
回答:那你还不如做一个查找替换 可以根据需要查找 替换所需的文字 百度一下就有
VB如何转换大小写!!!??
Private Sub Command1_Click()Dim C As String Dim S As String Dim I As Integer Text13.Text = ""For I = 1 To Len(Text12.Text)C = Mid(Text12.Text, I, 1)If C <> " " Then Select Case C Case "0"S = "零"Case "1"S = "壹"Case "2"S = "贰"Case "3"S = ...
vb编程 字母大小写转换
大写字母是65-90,用Chr()和Asc()这两个函数也可以实现大小写的转化的。Private Sub Form_Click()x = Text1.Text n = Len(Trim(x))For i = 1 To n l = Mid(x, i, 1)If l > "h" Then l = Chr(Asc(l) - 32)Text2.Text = Text2.Text & l End If Next i End Sub ...
vb字符串区分大小写
用lcase()或者ucase()函数将字符串完全转化为小写或大写 if lcase("c:\windows\system32")=lcase("c:\windows\system32")then msgbox "一样"else msgbox "不一样"end if 或者 if ucase("c:\windows\system32")=ucase("c:\windows\system32")then msgbox "一样"else msgbox "不一样"en...
VB 大小写转换。???
用两个函数,转小写lcase,转大写ucase Public a As String Private Sub Command1_Click()a = LCase(a)Text1.Text = a End Sub Private Sub Command2_Click()a = UCase(a)Text1.Text = a End Sub Private Sub Form_Load()a = "C4CA4238A0B923820DCC509A6F75849B"End Sub ...
求VB 通过两个按钮实现大小写字母转换的代码 单击按钮1转换为小写...
哪需要什么代码,vb原本就有这两个函数,ucase是转大写,Lcase转小写,比如 MyWord = UCase( "Hello") 'myword即为HELLO MyWord = LCase( "Hello") 'myword即为hello