Results 1 to 4 of 4

Thread: textbox function

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    151

    textbox function

    HI,

    I have two textbox, text1 and text2, let say text1 has a string ABCDEFG, my question is how could I only store the string into text2 if the string is highlight. Example, If I only highligh ABCD, it should only show ABCD on text2 (After I press button)?

    Thanks,
    Newbie

  2. #2
    Hyperactive Member fret's Avatar
    Join Date
    Sep 2004
    Posts
    472
    dunno if this help, but try this:
    VB Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.         TextBox2.Text = TextBox1.SelectedText
    3.     End Sub

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    151
    Hi fret,

    It's working, thank you very much

    Thanks,
    Newbie

  4. #4
    Hyperactive Member fret's Avatar
    Join Date
    Sep 2004
    Posts
    472
    no problem..
    happy coding...

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