Sie Ste

Sie Ste

  • NA
  • 196
  • 142k

C# obtain values entered into windows form page

Jun 11 2013 4:47 PM
I am writing a new C# 2010 desktop applicaton. I am using some of the exsting code in another C# 2010 application to start the new application since I will be using alot of existing code that works. I basically want to have a desktop form where the user can enter some data and return to the statement after 'Application.Run(new RejectForm());' listed below.

        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new RejectForm());
        }

I would like to have the data that was entered in the form be available to the application at this point.
Thus can you tell me the following:
1. How can I return to the location right after the Application.Run(new RejectForm()); statement?
2. How can i have the values that were entered on the windows form be available for the rest of the application to
    access from this point?

Answers (5)