novakon作者
17年7个月前IP:未同步
114037
20楼
近乎弱智的代码
Private Sub Command1_Click()
Text2.Text = Text1.Text

Text2.Text = Replace(Text2.Text, "<", "↓")
Text2.Text = Replace(Text2.Text, ">", "↑")
Text2.Text = Replace(Text2.Text, "-", "→")
Text2.Text = Replace(Text2.Text, "deg", "℃")

Dim str As String
str = ""
'-------------
If Check1.Value = 1 Then
For i = 1 To Len(Text2.Text)
    b = Asc(Mid(Text2.Text, i, 1))
    If i = 1 Then

        str = str + Chr(b)
    Else
        
        c = Asc(Mid(Text2.Text, i - 1, 1))
        If b >= 48 And b <= 57 And ((c > 97 And c < 122) Or (c > 65 And c < 90)) Then
            str = str + "[" + Chr(b) + "]"
        Else

            str = str + Chr(b)
        End If
    End If
Next

Text2.Text = str

End If


'-------------
Text2.Text = Replace(Text2.Text, "[", "")
Text2.Text = Replace(Text2.Text, "]", "
")
Text2.Text = Replace(Text2.Text, "{", "")
Text2.Text = Replace(Text2.Text, "}", "
")

Text2.Text = Replace(Text2.Text, "<", "[")
Text2.Text = Replace(Text2.Text, ">", "]")


Text2.SetFocus
End Sub

Private Sub Command2_Click()
Form2.Show
End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Command1_Click
End Sub

Private Sub Text2_gotfocus()
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
End Sub
评论
文号 / 114037

万流景仰
名片发私信
学术分 16
总主题 1270 帖总回复 8407 楼拥有证书:学者 机友 笔友
注册于 2008/03/29 15:34:00最后登录 2022/01/09 14:09:34
主体类型:个人
所属领域:无
认证方式:手机号
IP归属地:0

个人简介

已走,勿送

笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的