Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form clone
Message
De
08/08/2005 18:58:33
 
 
À
08/08/2005 18:49:52
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Titre:
Divers
Thread ID:
01039313
Message ID:
01039434
Vues:
19
>>Right-click on the Form in the Solution Explorer and choose "Copy". Then right-click on the Project and choose "Paste".
>
>Great!
>
>> Then, you probably want to rename the file (because it will call it "Copy of MyForm") ... just right-click on it to Rename it. Unfortunately, the IDE is still not smart enough to change any of the code in the Form class when you do this, so you'll need to open up the copied Form (in code view, not in designer view) and change the class name, which will still have the old Form's name). You'll need to change the class name, the constructor, and the a few properties in the generated code (this.Name and this.Text).
>
>Sure, I can live with that. That is done quickly, and I have to do additional changes anyway.
>
>One more question: Why didn't the other approaches work? What is going on? For example, create a duplicate of a form in Windows Explorer, and then add it to the project.
>
>I forgot to mention: Using Visual Studio 2003.

Did you make the internal changes? Did you end up with the 2 classes with the same name in the same namespace?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform