Re: Renaming Windows Forms and Files



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


.



Relevant Pages

  • Re: Web Service Bug
    ... VS IDE isn't enough smart that it could ... rename the reference outside the code file... ... In VS 2008, when you rename webserivice name in .cs file, VS IDE will show ... Microsoft Online Community Support ...
    (microsoft.public.vsnet.ide)
  • Re: Inconsistant SharePoint FrontPage Operation - The Server Could Not Complete Your Request...
    ... and apologies again for my little outburst ... > Kevin Spencer ... >> So if there is a performance problem, I do not think it is ... >> IDE ...
    (microsoft.public.frontpage.programming)
  • RE: Web Service Bug
    ... rename the reference outside the code file... ... In VS 2008, when you rename webserivice name in .cs file, VS IDE will show ... Microsoft Online Community Support ...
    (microsoft.public.vsnet.ide)
  • Re: Want add / remove Components in ToolBox
    ... (nor does the VS.NET IDE takes its References from there, ... GAC is used mostly at runtime, and has almost no influence on the IDE ... toolbox object model to add / replace your controls on a toolbox tab of your ...
    (microsoft.public.vsnet.ide)
  • Re: How can I list references in a VB6 project
    ... The references collection is part of the IDE, ... Unlike VB they can always access the reference collection of there IDE. ... you can access VB's reference collection via an addin. ...
    (comp.lang.basic.visual.misc)