How do I save a textbox using a button?

Posted 04 October 2010 - 08:48 PM

I am trying to make a Windows Forms Application with three textboxes that add to a fourth textbox using a button. How do I take the numbers from the first three textboxes and then keep a running tally in three respective boxes when using another button. I will attach the coding that I have already done. I have problems with the running variables below. I can't figure out how to save the numbers and have them add together.

Re: How do I save a textbox using a button?

Posted 04 October 2010 - 09:04 PM

1) Change your textboxes to NumericUpDown or MaskedTextBox. That way your users can't enter "bob" where they should have a number.
2) This is a fraking mess. Please copy from your visual studio project and paste into the post. This does not look like code you are actually trying to run from VS. It looks like various samples spliced from Google projects. There are multiple lines duplicated later on... there is no method for when you click a button. Its a bunch of disjointed keyboard scribblings.

Re: How do I save a textbox using a button?

I am sorry for the sloppy posts, I am really new at this and don't really know what I am doing if you can't tell. I do appreciate all of your help. I have just one more question. If I wanted to have the number of tickets be a running tally as well, do I create three other variables above, declare another decimal variable, or can I do TicketA += TicketA;.