Get Data from Windows Form into C# program

Posted by Jimmy on Stack Overflow See other posts from Stack Overflow or by Jimmy
Published on 2010-03-14T17:46:28Z Indexed on 2010/03/14 17:55 UTC
Read the original article Hit count: 180

Filed under:
|
|

I want my C# program to collect data. Then, when the OK button is clicked, I want this data to be loaded into my program -- such as into variables in Main(), or into data members of a class I have constructed, and I want the form to then go away -- not be hidden, but actually closed. Alas, read as I might in the book I have, the data collected by the form stays in the form, execution proceeds within the form, and the same form is used to display the result of the program's computations. Sheesh. All I want is to capture the form's information, close the form and proceed with my program. I would appreciate some tips on geting data from a form into Main() or into a class's data members.

Thanks, Lucky

© Stack Overflow or respective owner

Related posts about c#

Related posts about Windows