Foxtable(狐表)用户栏目专家坐堂 → 如果读取全部都是字符的rtf文件?


  共有2834人关注过本帖树形打印复制链接

主题:如果读取全部都是字符的rtf文件?

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106209 积分:540168 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/4/17 9:21:00 [显示全部帖子]

参考:

Dim Curfile As String =  "D:\问题\EventCode.rtf"
Try
    Dim Rich As String = FileSys.ReadAllText(Curfile)
    Dim rtBox As new System.Windows.Forms.RichTextBox()
    rtBox.Rtf = Rich
    Output.Show(rtBox.text)
Catch ex As Exception
    msgbox(ex.message)
End Try

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106209 积分:540168 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/4/17 10:36:00 [显示全部帖子]

Dim Curfile As String =  "D:\问题\EventCode.rtf"
Try
    Dim Rich As String = FileSys.ReadAllText(Curfile)
    Dim rtBox As new System.Windows.Forms.RichTextBox()
    rtBox.Rtf = Rich
    Dim cr() As String = rtBox.text.split(vblf)
    For Each s As String In cr
        Output.Show(s)
    Next
Catch ex As Exception
    msgbox(ex.message)
End Try

 回到顶部