
Text Wrap in a simple text box??!!!??? (Yes, again)
I posted here a week or so ago and got some replies which I
was sure had solved my dilemna, until I tried them. For
some reason they still don't work. For those who missed my
first post, I am trying to import CNC files into VB. They
are simple text files, nothing fancy. Multiline. I am
merely trying to load them and display the file in a simple
text box.
Using VB5, multiline enabled. The text box was displaying
characters for the carriage return rather than actually
inserting a new line. Here's the real original code I had:
Private Sub Form_Load()
Text1 = " "
If cncfile$ = "" Then
Open cncfile$ For Input As #1
Do While Not EOF(1)
Line Input #1, a$
Text1 = Text1 & a$
Loop
Else: Text1.Text = "No CNC File Loaded"
End If
End Sub
Here's some other things I tried, replacing line 6 as per
suggestions of this discussion group (by the way, thanks
guys. The help and education is appreciated):
Text1 = Text1 & a$ & vbCrLf
Text1 = Text1 & a$ & Chr$(13) & Chr$(10)
Text1 = Text1 & a$ & Chr$(13)
Text1 = Text1 & a$ & vbCr
Text1 = Text1 & a$ & vbLf
Text1 = Text1 & a$ & Chr$(10)
None of these worked either. The text box finds the file
and loads it alright, but will not recognize a carriage
return, only displays characters in their place.
What up with that???
Thanks,
Ian
* Sent from AltaVista http://www.*-*-*.com/ Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful