Insert Text Into Another TextBox?
Hello, I am trying to make a program that the user fills out a field then it inserts it between this
<marquee>IN HERE</marquee>
I am usin Visual Basic Ultimate 2010
I need a text box that they fill out then they click another button then it inserts the text that that person filled in the texbox between the >INHERE<
THANKS IF YA'LL CAN HELP!
thx again.. LOL
Re: Insert Text Into Another TextBox?
It's just Strings:
vb.net Code:
Dim myString = "<marquee>" & myTextBox.Text & "</marquee>"
You can then do as you like with 'myString', e.g. assign it to the Text property of another TextBox.
Re: Insert Text Into Another TextBox?
Yeah but where would I put the code the button or the textbox?
Re: Insert Text Into Another TextBox?
Neither. The code goes in the form of course. The form contains all the code that handles the events of its child controls. Think about when you want this code to be executed. That will tell you where to put it. Do you want to execute the code when the user clicks a Button? Then the code goes in the Button's Click event handler. Do you want to execute the code when the user changes the text in a TextBox? Then the code goes in the TextBox's TextChanged event handler. Just think about what functionality you want and that will tell you what code to write.