Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Create a new line on visual basic text box
Closed Thread
Old 06-25-2007, 09:16 PM   #1 (permalink)
 
Super Techie

Join Date: Sep 2006

Location: Altoona, PA

Posts: 250

Mike9182 is on a distinguished road

Send a message via AIM to Mike9182
Default Create a new line on visual basic text box

I am making a chat bot like jay_bo said about. I created a textbox and set it to be multi line. How can I set it so that new responses are written to the next line instead of just being added to the end of what is there? I tried to use the visual basic how to, and found something about carriage return and line ending's being embedded, but couldn't figure out how to use them.

I am trying to start learning visual basic, so I am probably gonna have a lot more questions.

Tia
__________________

My Comp:
Antec 900
Gigabyte DS3
EVGA 8800GTS (G92)
Antec TruPower 650 watt psu
Core 2 Duo E6700 @ 3.3Ghz
G.Skill 4GB DDR2-800
2 x Seagate Barracuda 250GB HDD in RAID 0
1 x Seagate Barracuda 500GB HDD
ACER 19" 5ms monitor
ZALMAN CNPS9500 cpu fan/heatsink
Mike9182 is offline  
Old 06-28-2007, 04:45 AM   #2 (permalink)
 
Newb Techie

Join Date: Jun 2007

Posts: 19

lutics is on a distinguished road

Default Re: Create a new line on visual basic text box

Environment.NewLine()


Example.

Quote:
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = TextBox1.Text + "heyllo " & Environment.NewLine
End Sub
End Class
I would recommend a list box instead of a textbox if your going to use it as like a log?
lutics is offline  
Old 06-28-2007, 04:39 PM   #3 (permalink)
 
Super Techie

Join Date: Sep 2006

Location: Altoona, PA

Posts: 250

Mike9182 is on a distinguished road

Send a message via AIM to Mike9182
Default Re: Create a new line on visual basic text box

Ok, i was gonna post what I sent and then what the program responded kind of like on instant messengers.
__________________

My Comp:
Antec 900
Gigabyte DS3
EVGA 8800GTS (G92)
Antec TruPower 650 watt psu
Core 2 Duo E6700 @ 3.3Ghz
G.Skill 4GB DDR2-800
2 x Seagate Barracuda 250GB HDD in RAID 0
1 x Seagate Barracuda 500GB HDD
ACER 19" 5ms monitor
ZALMAN CNPS9500 cpu fan/heatsink
Mike9182 is offline  
Old 06-28-2007, 05:17 PM   #4 (permalink)
 
Newb Techie

Join Date: Jun 2007

Posts: 19

prodigy is on a distinguished road

Default Re: Create a new line on visual basic text box

What you might want to do is have a read-only multi-line textbox and a normal editable textbox. Everytime a user enters data into the textbox and presses "send", or whatever you have designated as your processing action, and then it can append to existing test in the read-only textbox after adding the carriage return. that way, it will work more like your typical IM application.
prodigy is offline  
Old 08-12-2007, 06:35 PM   #5 (permalink)
jay_bo's Avatar
 
Ultra Techie

Join Date: Jul 2006

Posts: 898

jay_bo is on a distinguished road

Default Re: Create a new line on visual basic text box

hey dude if i remember 2moz i will post you an example
__________________
jay_bo is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic & FineReader 8.0. Help ! Johnny888 Programming Discussions 1 05-29-2007 07:55 PM
quick and easiest way to learn visual basic.net? maxima2k2 Programming Discussions 2 05-22-2007 08:46 AM
Best way to create a website with content editable by a text document? nick616 Browser & General Internet Questions 6 05-11-2007 12:04 PM