|
-
Aug 11th, 2000, 04:12 PM
#1
Thread Starter
Frenzied Member
I hope I can explain this correctly.
I have a text box that a user can type in a message with multipul lines. Then save this message for another time to a text file. When I load the message back to the text box from the file using a string, I get visual Enters (small black rectangles) not carriage returns on the text box. How do I get the text box to go to the next line instead of showing the damn black retangles.
I hope this makes sense.
Thanks
-
Aug 11th, 2000, 04:23 PM
#2
How does you save and load the file?
Have you set MultiLine to true for the textbox?
-
Aug 11th, 2000, 04:28 PM
#3
Thread Starter
Frenzied Member
Code:
'Save
If msgTitle = "" Then Exit Sub
Open FilePath & FileName For Append As #1
Print #1, "[Title]= " & msgTitle
Print #1, "[Message]= " & outMsg
Close #1
'Open
Open FilePath & FileName For Input As #1
While Not EOF(1)
Input #1, strTemp
If InStr(strTemp, "[Title]=") <> 0 Then
If Not Looking Then
SavedMsg(Count).strTitle = Mid(strTemp, 10, Len(strTemp))
Looking = True
Else
Count = Count + 1
SavedMsg(Count).strTitle = Mid(strTemp, 10, Len(strTemp))
End If
ReDim Preserve SavedMsg(Count + 1)
ElseIf Looking Then
If InStr(strTemp, "[Message]=") <> 0 Then
SavedMsg(Count).strMsg = Mid(strTemp, 12, Len(strTemp))
Else
If SavedMsg(Count).strMsg <> "" Then
SavedMsg(Count).strMsg = SavedMsg(Count).strMsg & Chr(13) & strTemp
End If
End If
End If
Wend
Close #1
txtmsg.text = SavedMsg(1).strMsg
Yes I do Have multi lines on. It looks fine when you type it and in the text file. So it has to be in the load or the writing to the text box
-
Aug 13th, 2000, 05:29 PM
#4
Use Line Input # instead of Input # and change Chr(13) to vbCrLf.
Good luck!
-
Aug 14th, 2000, 10:16 AM
#5
Thread Starter
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|