图 b
编写解密的VB程序,功能如下:在文本框Text1中输入密文,单击“解密”按钮Command1,在文本框Text2中显示去重后的文本,并在标签Label1中显示明文。程序运行界面如图所示。
Private Sub Command1_Click()
Dim s1 As String,s2 As String, c As String,mw As String
Dim i As Integer
s1 = Text1.Text
s2 = Mid(s1, 1, 1)
For i = 2 To
c = Micd(s1, i, 1)
If c >= "A" And c <= "Z" Then
If Then s2 = s2 + c
Else
s2 = s2 + c
End If
Next i
mw = ""
i = 6
Do While i<= Len(s2)
mw = mw + Mid(s2, i, 1)
Loop
Text2.Text = s2
Label1.Caption = mw
End Sub
请回答下列问题: