设计一个VB小程序

418关注834浏览

展开全部
收起
2回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • Cooper55

    66人对此回答表示赞同

    Private Sub Command1_Click()
    Open "C:\Documents and Settings\Administrator\桌面\fafa中英文混合.txt" For Input As #1
    Do Until EOF(1)
    Line Input #1, fafa
    Text1 = Text1 & fafa & vbCrLf
    Loop
    Close #1
    End Sub

    Private Sub Command2_Click()
    s = Len(Text1)
    For i = 1 To s
    'Text2 = Text2 & Asc(Mid(Text1, i, 1)) & " : "
    If Asc(Mid(Text1, i, 1)) < 1 Then
    Text2 = Text2 & Mid(Text1, i, 1)
    Open "C:\Documents and Settings\Administrator\桌面\fafa中英文混合2.txt" For Output As #1
    Print #1, Text2
    Close #1
    End If
    Next i
    End Sub

    Private Sub Form_Load()
    Command1.Caption = "读取"
    Command2.Caption = "转换生成新的txt"
    End Sub
    有些字符我不知道范围,你测试一下,如有别的字符,得出他的ascii然后再限一下它的范围就可以了
    展开
    66
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • 张三筒

    66人对此回答表示赞同


    Private Sub Command1_Click()
    Open "C:\Documents and Settings\Administrator\桌面\fafa中英文混合.txt" For Input As #1
    Do Until EOF(1)
    Line Input #1, fafa
    Text1 = Text1 & fafa & vbCrLf
    Loop
    Close #1
    End Sub

    Private Sub Command2_Click()
    s = Len(Text1)
    For i = 1 To s
    'Text2 = Text2 & Asc(Mid(Text1, i, 1)) & " : "
    If Asc(Mid(Text1, i, 1)) < 1 Then
    Text2 = Text2 & Mid(Text1, i, 1)
    Open "C:\Documents and Settings\Administrator\桌面\fafa中英文混合2.txt" For Output As #1
    Print #1, Text2
    Close #1
    End If
    Next i
    End Sub
    展开
    66
    0回复
    发布于 7年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部