Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passsing parameters
Message
 
À
14/01/2009 16:10:46
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01373731
Message ID:
01373736
Vues:
18
>Hello UT,
>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.
>Any help is appreciated!!!!
>
>Here is the code :
>
>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());
>        }
>    }
>}
>
>
Application.Run(new Form1(args));

then in the constructor for Form1
public Form1(string[] args)
{
// code here
}
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform