Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem when created OnLoad Method
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Problem when created OnLoad Method
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01445631
Message ID:
01445631
Vues:
86
Hi,

I wanted to add OnLoad method to my form class. Here is what I did:

1. In the Win Form Property window I selected Events and then clicked on Load event.

This created a method in the form class as following:
       private void frmMyFormName_Load(object sender, EventArgs e)
        {
        }
2. Then I added a line base.OnLoad(e) as following:
       private void frmMyFormName_Load(object sender, EventArgs e)
        {
            base.OnLoad(e);
        }
Now when I run the form I get error "System.StackOverflowException". What am I missing?

TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform