Sinisterly
How do i add text in a box? vb - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.li/Forum-Visual-Basic-NET-Framework)
+--- Thread: How do i add text in a box? vb (/Thread-How-do-i-add-text-in-a-box-vb)

Pages: 1 2


How do i add text in a box? vb - Metrixprime105 - 08-25-2014

Hello im, trying to insert text so when i hit the button it will do this,



hello
my
name
is
eddie


How do i do this?


RE: How do i add text in a box? vb - bcoppell - 08-25-2014

That depends on whether you are referring to VBS text box's or DOS.
Send me a private message with clarification and I'll be more than happy to help out.


RE: How do i add text in a box? vb - ArkPhaze - 09-01-2014

(08-25-2014, 01:05 PM)bcoppell Wrote: That depends on whether you are referring to VBS text box's or DOS.
Send me a private message with clarification and I'll be more than happy to help out.

lol DOS has a TextBox and Button controls, since when?... I really don't get what you're trying to hint at here.

You can do that like this:
Code:
textBox1.Lines = new[] { "hello", "my", "name", "is", "eddie" };

Edit: VB.net
Code:
TextBox1.Lines = {"hello", "my", "name", "is", "eddie"}



RE: How do i add text in a box? vb - testardube - 09-10-2014

you can replace space with newline ("\n");


RE: How do i add text in a box? vb - testardube - 09-10-2014

you can replace space with newline ("\n");


RE: How do i add text in a box? vb - alok9shm - 09-10-2014

Insert a TextBox in the Form

Keeping the textbox selected, look for the Text property in the properties window. Defaul value should be Text1, delete it.

Next, Add a Command Box

Keep it selected and similarly, add the desired text over the box in the Caption property.

Next Double click on Command Box to access the code editor.

before the "End Sub" statement, add the following line:

Text1.text = "Hello my name is this and that "

Save and then try running it.


[/quote]



RE: How do i add text in a box? vb - bcoppell - 09-16-2014

(09-01-2014, 08:26 AM)ArkPhaze Wrote:
(08-25-2014, 01:05 PM)bcoppell Wrote: That depends on whether you are referring to VBS text box's or DOS.
Send me a private message with clarification and I'll be more than happy to help out.

lol DOS has a TextBox and Button controls, since when?... I really don't get what you're trying to hint at here.

You can do that like this:
Code:
textBox1.Lines = new[] { "hello", "my", "name", "is", "eddie" };

Edit: VB.net
Code:
TextBox1.Lines = {"hello", "my", "name", "is", "eddie"}



Here, this is a DOS command that displays a small, very basic text box:

Msg * "your text"


RE: How do i add text in a box? vb - bcoppell - 09-16-2014

(09-01-2014, 08:26 AM)ArkPhaze Wrote:
(08-25-2014, 01:05 PM)bcoppell Wrote: That depends on whether you are referring to VBS text box's or DOS.
Send me a private message with clarification and I'll be more than happy to help out.

lol DOS has a TextBox and Button controls, since when?... I really don't get what you're trying to hint at here.

You can do that like this:
Code:
textBox1.Lines = new[] { "hello", "my", "name", "is", "eddie" };

Edit: VB.net
Code:
TextBox1.Lines = {"hello", "my", "name", "is", "eddie"}



Here, this is a DOS command that displays a small, very basic text box:

Msg * "your text"


RE: How do i add text in a box? vb - bcoppell - 09-16-2014

(09-01-2014, 08:26 AM)ArkPhaze Wrote:
(08-25-2014, 01:05 PM)bcoppell Wrote: That depends on whether you are referring to VBS text box's or DOS.
Send me a private message with clarification and I'll be more than happy to help out.

lol DOS has a TextBox and Button controls, since when?... I really don't get what you're trying to hint at here.

You can do that like this:
Code:
textBox1.Lines = new[] { "hello", "my", "name", "is", "eddie" };

Edit: VB.net
Code:
TextBox1.Lines = {"hello", "my", "name", "is", "eddie"}



Here, this is a DOS command that displays a small, very basic text box:

Msg * "your text"


RE: How do i add text in a box? vb - ArkPhaze - 09-17-2014

(09-16-2014, 02:47 PM)bcoppell Wrote:
(09-01-2014, 08:26 AM)ArkPhaze Wrote:
(08-25-2014, 01:05 PM)bcoppell Wrote: That depends on whether you are referring to VBS text box's or DOS.
Send me a private message with clarification and I'll be more than happy to help out.

lol DOS has a TextBox and Button controls, since when?... I really don't get what you're trying to hint at here.

You can do that like this:
Code:
textBox1.Lines = new[] { "hello", "my", "name", "is", "eddie" };

Edit: VB.net
Code:
TextBox1.Lines = {"hello", "my", "name", "is", "eddie"}



Here, this is a DOS command that displays a small, very basic text box:

Msg * "your text"

You don't even understand what a textbox is... That would be a message box. And that's not DOS just because it invokes a window to pop up, that's the program msg.exe...