' 功能:窗体上建立了两个文本框 Text1( 输入字符串 ) 及 Text2( 转换结果 ) ,一个命令按钮 Command1(" 清除 ") 。录入 Text1 内容时,将录入内容大写字母转为小写,小写转为大写。 '------------------------------------------------------- Private Sub Command1_Click() Text1.Text = "" Text2.Text = "" Text1.SetFocus End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) Dim s As String * 1 '**********SPACE********** s = 【 ? 】 (KeyAscii) Select Case s '**********SPACE********** Case "A" 【 ? 】 "Z" s = LCase(s) Case "a" To "z" '**********SPACE********** s = 【 ? 】 Case Else s = "*" End Select Text2.Text = Text2.Text + s End Sub