Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add custom property to a form?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01204821
Message ID:
01204834
Vues:
13
This message has been marked as the solution to the initial question of the thread.
You just need to add the proprety in the class declaration. Just open the designer, right click over the form and click "View Code", once in code view add your property declaration like this:
namespace myNameSpace
{
    public partial class Form1 : Form
    {
        public string myProperty;  // LIKE THIS
        private string myOtherproperty; // OR LIKE THIS
        public Form1()
        {
            InitializeComponent();

        }
HTH

Enmanuel

>I need to keep track of "something" as the Timer event (.Tick <g>) fires. In VFP world (used to be a language like that, maybe some of you older folk remember <g>) it was done by adding a custom property to a form. Then this property was in scope in any method of the form.
>
>Is there a way to set such a custom property to a Win.net form? Or, if not, what would be another way to do it?
>
>Thank you.
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform