Re: Renaming Windows Forms and Files
- From: "Kevin Spencer" <spam@xxxxxxx>
- Date: Sun, 8 Oct 2006 21:51:19 -0400
To quote myself:
In the Visual Studio IDE, if you rename (not save as) a
Form, the class name will be changed to the same name as the file name.
That is how to change the name of the Form class in the IDE, if you want the
class file name to be the same name as the Form. The IDE will refactor all
other references to the Form to use the name you change it to. If you don't
want or need the file name to be the same as the Form name, you can simply
rename the Form in your code. All references to the Form class will also be
updated to reflect the new name.
As for your further questions, first, here's an excellent reference to all
things .Net:
http://msdn2.microsoft.com/en-us/library/default.aspx
I didn't understand this (new?) question:
how to properly add the files for forms to projects such that they can
be editted in the designer
If I understand you correctly (I don't know if I do), you right-click the
Project in the IDE, and select Add, and select "Windows Form" from the
context menu to add another Form to the Project.
--
HTH,
Kevin Spencer
Microsoft MVP
Computer Control Freak
http://unclechutney.blogspot.com
A man, a plan, a canal, a palindrome that has.. oh, never mind.
"StephenJ" <StephenJ@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1E2D1D5E-630E-46B0-B50D-EBFA5CAA335D@xxxxxxxxxxxxxxxx
"Kevin Spencer" wrote:
The name of a class and the Name property of a
System.Windows.Forms.Control
class (System.Windows.Forms.Form inherits Control) are 2 completely
different things. In the Visual Studio IDE, if you rename (not save as) a
Form, the class name will be changed to the same name as the file name.
I appreciate the reply Kevin, but I still don't understand how to properly
change the name of a form, how to properly rename the files containing the
form, how to properly add the files for forms to projects such that they
can
be editted in the designer, and where I can find information on this in
MSDN.
Any help with these specific items would be much appreciated.
StephenJ
.
- References:
- Re: Renaming Windows Forms and Files
- From: Kevin Spencer
- Re: Renaming Windows Forms and Files
- Prev by Date: Re: uncleared code
- Next by Date: Re: Windows forms slow drawing of controls
- Previous by thread: Re: Renaming Windows Forms and Files
- Next by thread: how to architecture a windows forms application
- Index(es):
Relevant Pages
|