How to hide linefeed, and carriage return characters in text boxes 
Author Message
 How to hide linefeed, and carriage return characters in text boxes

I'm reading files into a text box and these characters show up.  How do
I make them invisible?
--
To respond via e-mail, please remove what's between Eric and Goforth in
my address in order to get my real e-mail address.


Sat, 28 Jul 2001 03:00:00 GMT  
 How to hide linefeed, and carriage return characters in text boxes

Quote:

>I'm reading files into a text box and these characters show up.  How do
>I make them invisible?

Did you make the textbox multiline? (hint: it's a property)

        Bart.



Sat, 28 Jul 2001 03:00:00 GMT  
 How to hide linefeed, and carriage return characters in text boxes
The ASCII code for a linefeed is CHR$(10) and the ASCII code for a carriage
return is CHR$(13)
If you read the files in one line at a time then these codes wont be attached
then just add all the lines together like this

dim bigline as string, tinyline as string
bigline = ""
open ???? for input as #1
do while not eof(1)
    line input #1, tinyline
    bigline = bigline & tinyline
loop
close #1
text1.text=bigline

The only problem with this is that you may accidentally connect two words
together. If hyphens are at the end of the lines then they will be embedded in
the text. So it can get a little complicated.

If you read the whole file into one line then you can search using the instr
function for ASCII characters 10 and 13

Good luck
--
Rick English

http://Rick.English.net



Sat, 28 Jul 2001 03:00:00 GMT  
 How to hide linefeed, and carriage return characters in text boxes
Try using
Replace(Text1.Text,CHR$(10)," ")
Replace(Text1.Text,CHR$(13)," ")
This will give you a double-space wherever there is a linefeed and
carriage return.  Just modify the " " to change what you want to replace
them with.

Jon Helms

Quote:

> I'm reading files into a text box and these characters show up.  How do
> I make them invisible?
> --
> To respond via e-mail, please remove what's between Eric and Goforth in
> my address in order to get my real e-mail address.



Sat, 28 Jul 2001 03:00:00 GMT  
 How to hide linefeed, and carriage return characters in text boxes
Don't look!

Mike

Quote:

>I'm reading files into a text box and these characters show up.  How do
>I make them invisible?
>--
>To respond via e-mail, please remove what's between Eric and Goforth in
>my address in order to get my real e-mail address.



Sun, 29 Jul 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. linefeed & carriage return

2. Replace linefeed with carriage return

3. Carriage Return and Linefeed

4. How to ignore linefeed and carriage return while using PRINT#

5. How to ignore linefeed and carriage return while using PRINT#

6. How to ignore linefeed and carriage return while using PRINT#

7. Carriage Returns In Text Boxes

8. Carriage Return in text box

9. carriage return in a text box?

10. Carriage return in text box?

11. Inserting a carriage return in a text box

12. Putting a Carriage Return in to a rich text box

 

 
Powered by phpBB® Forum Software