Results 1 to 5 of 5

Thread: save text with out extra lines

  1. #1

    Thread Starter
    Hyperactive Member dandono's Avatar
    Join Date
    Aug 2004
    Location
    Cornwall, UK
    Posts
    485

    Resolved save text with out extra lines

    i have a code that saves some settings in my app like a picture path for the background
    i use the rtf as i dont want to code a lot of code just to save a text doc. i got it to save a text doc but it saves with 1 or 2 lines with nothing on it and when i load my app. it does not work because of these lines.
    can i get my app to save text on only one line no matter how long the path is?
    Last edited by dandono; Oct 14th, 2004 at 01:47 AM.
    If there is only one perfect person in the universe, does that make them imperfect?

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    post the code that you're using.

  3. #3

    Thread Starter
    Hyperactive Member dandono's Avatar
    Join Date
    Aug 2004
    Location
    Cornwall, UK
    Posts
    485
    Private Sub Form_Unload(Cancel As Integer)
    sMyfile = App.Path + "\bgpath.txt"

    If Len(Trim(sMyfile)) <> 0 Then

    Open sMyfile For Output As #1
    Print #1, bgpath.Text
    Close #1

    End If
    End Sub


    when i save text from a rich text box. it adds a new line then my program cannot read it properly

    it is a text doc with the location of an image that my app makes its background picture
    If there is only one perfect person in the universe, does that make them imperfect?

  4. #4
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    Print #1, Replace(bgpath.Text, vbCrlf, "");

  5. #5
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Resolved

    Add the checkmark and the word [RESOLVED] to the first post in the thread to mark it as resolved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width