A Conversation for The H2G2 Programmers' Corner
putting lines breaks into text in Visual Basic 6
Din'Amarth, Keeper of all bad jokes, exept those which are stunningly bad. Started conversation Jul 22, 2002
I need to know how to put line breaks in text in Visual Basic 6. I can't find my library CD thingy with the help files, and the online help is extremely difficult to use. Thanks.
~~Din'
Better yet...
Din'Amarth, Keeper of all bad jokes, exept those which are stunningly bad. Posted Jul 22, 2002
Better yet, what I really need to know is how to make a text box type thing that moves everything down and puts the new thing at the top whenever any new text is added to the box. My idea for doing this would something like this: (with whatever makes a line break instead of <line break>
text1.text="new text"++"______________"+ +text1.text
Hopefully this would look like
new text
______________
old text
If there is an easier way to do this I would be very appreciative to hear it.
~~Din'
Better yet...
26199 Posted Jul 22, 2002
Well, I'm guessing, but what you prob'ly want is ASCII character 13 and/or 10. There are probably escape codes, but in most versions of basic you can also type chr(13), or something along those lines...
Better yet...
Din'Amarth, Keeper of all bad jokes, exept those which are stunningly bad. Posted Jul 22, 2002
When I do that it puts up a thickish vertical line. Are you sure that 13 is the right number?
~~Din'
Better yet...
Jonny Posted Jul 22, 2002
I think so, but the constant for it is vbCrLf (standing for VB character Line Feed). So if you have:
Text1.Text= "Hello" & vbCrLF & "World"
You get the output
Hello
World
Better yet...
DoctorMO (Keeper of the Computer, Guru, Community Artist) Posted Jul 22, 2002
Perfect, I always seem to be late...
(Unless your planning on sending things to Linux, Amigas or Macs, like I did with a serial link, opps)
-- DoctorMO --
Key: Complain about this post
putting lines breaks into text in Visual Basic 6
- 1: Din'Amarth, Keeper of all bad jokes, exept those which are stunningly bad. (Jul 22, 2002)
- 2: Din'Amarth, Keeper of all bad jokes, exept those which are stunningly bad. (Jul 22, 2002)
- 3: 26199 (Jul 22, 2002)
- 4: Din'Amarth, Keeper of all bad jokes, exept those which are stunningly bad. (Jul 22, 2002)
- 5: Jonny (Jul 22, 2002)
- 6: DoctorMO (Keeper of the Computer, Guru, Community Artist) (Jul 22, 2002)
More Conversations for The H2G2 Programmers' Corner
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."