Source code |
|
1 2 3 4 5 6 7 8 9 |
Public Sub SaveRTF(RTB As RichTextBox,RTFFile As String) Dim Fil As New FileOutputStream Dim Doc As New DefaultStyledDocument(New StyleContext) Dim Kit As New RTFEditorKit Fil=New FileOutputStream(RTFFile) RTB.Parent.setEditorKit(Kit) RTB.Parent.setDocument(Doc) Kit.Write(Fil,Doc,0,0) End Sub |
This post has been edited 2 times, last edit by "klctal" (Jul 23rd 2009, 10:46am)
Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves
Source code |
|
1 2 3 4 5 6 7 8 9 |
Public Sub SaveRTF(RTB As RichTextBox, RTFFileName As String) Dim fos As New FileOutputStream(New File(RTFFileName)) Dim Doc As Document = RTB.Parent.getDocument Dim kit As EditorKit = RTB.Parent.getEditorKit Call kit.Write(fos, Doc, 0,0) fos.close End Sub |
Source code |
|
1 2 3 4 5 6 7 8 9 10 |
Public Sub SaveRTF(RTB As RichTextBox, RTFFileName As String) Dim fos As New FileOutputStream fos=New FileOutPutStream(RTFFileName) Dim Doc As Document Doc=RTB.Parent.getDocument Dim kit As EditorKit kit = RTB.Parent.getEditorKit Call kit.Write(fos, Doc, 0,0) fos.close End Sub |
Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves
Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves