Results 1 to 4 of 4

Thread: Insert Text Into Another TextBox?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    2

    Exclamation 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

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Insert Text Into Another TextBox?

    It's just Strings:
    vb.net Code:
    1. 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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    2

    Re: Insert Text Into Another TextBox?

    Yeah but where would I put the code the button or the textbox?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width