CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2010
    Posts
    10

    Copy all text in textboxes

    In the form that I am creating, I have a series of textboxes that need to be copied and pasted together into one box. The text in the current textboxes also need to have a value next to them in the output box so to speak

    For Example:
    Input -
    Name: John Smith
    Age: 25
    Issue: Could not find his way home.
    Resolution: Gave him directions back home.

    Output-
    CU: John Smith
    Age: 25
    ISS: Could not find his way home.
    RESO: Gave him directions back home.


    Something along those lines. I know there is a way for me to copy text directly from a text box, but what I would like is a value added as well. Does that make sense? Im trying to describe it as basically as possible.

    Right now I have a JavaScript application I am using with IE6(only browser company will allow) that will add values when text has been copied. I would like for the same thing to happen with this if possible.

    Thanks in advance for any help you guys are able to help in any way!

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Copy all text in textboxes

    Explain what you want. You want to read from a WEBPAGE and post to a FORM? Or the other way around?

    Are you using a WEBBROWSER control? If you did that, you would have the DOM values of the page.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Oct 2010
    Posts
    10

    Re: Copy all text in textboxes

    I can understand the confusion with my initial post. Basically I want a standalone form that does not connect to the internet and does not work with a browser. The information that it would be copying would be from its own textboxes.

    I want it to be an exe file that can be executed on any computer. I basically do not want the browser to interact with the java app at all.

  4. #4
    Join Date
    Oct 2010
    Posts
    11

    Re: Copy all text in textboxes

    Something like this:

    namespace Plaything
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
    string[] combotext = new string[2];
    combotext[0] = "Line1: " + textBox1.Text.ToString();
    combotext[1] = "Line2: " + textBox2.Text.ToString();
    textBox3.Lines = combotext;
    }
    }
    }

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

Featured