static class Program { ... Application.Run(new Form1(args)); ... } public partial class Form1 : Form { public Form1(string[] args) { InitializeComponent(); *-- Use parameters here } }>I need to pass parameters to a form (Form1) that is called in my main. I do collect the parameters using the args then I would like to pass it to the form called Form1.
>namespace PrintingLabel >{ > static class Program > { > /// <summary> > /// The main entry point for the application. > /// </summary> > [STAThread] > static void Main(params string[] args) > { > > Application.EnableVisualStyles(); > Application.SetCompatibleTextRenderingDefault(false); > MessageBox.Show(args[0].ToString()); > MessageBox.Show(args[1].ToString()); > > // HERE HOW DO I PASS THE PARAMETERS > > > Application.Run(new Form1()); > } > } >} > >