Qucik Visual C# Help?

Discussion in 'Programming' started by 24download, Jan 15, 2011.

  1. #1
    Hi Guys

    I have a textbox on one form and basically when i click the submit button i need it to take the value in the textbox convert to an integer and add it as a variable on my other form? Which can be implemented into a textbox on that form further down the line.

    Can someone provide a detailed and quick explanation for me? Would be much appreciated.
     
    24download, Jan 15, 2011 IP
  2. YourPublisher

    YourPublisher Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can do like this hope this code helps

    int n;
    n= Int32.Parse(textbox1.text);

    form2 frm = new form2(n);

    and on second form you can modify constructor object

    public form2() with public form2(int n);

    and can get value in the constructor
     
    YourPublisher, Jan 15, 2011 IP