Yup. Edit the name directly. The beauty of it is that all the code behind
(partial classes) get renamed too. You only need to do a full "refactor" if
that's... well.... if that's what you want to do.
So the steps are:
Select the form in Solution Explorer, right-click and hit Copy. Then, select
the project in Solution Explorer, right-click and hit Paste. Before opening
the newly created form, hit View Code in Solution Explorer and rename the
class *directly* in the code editor (DON'T do right-click->rename). That's
it.
P.S.
This doesn't work as elegantly for webforms (though the steps are similar).
But, then the ASP.NET IDE Designer team have never really done a great job
with anything IMHO.
"Terry" <(E-Mail Removed)> wrote in message
news:5B68D63F-35FF-4632-BFA6-(E-Mail Removed)...
> Ok, got it. You edited the name as opposed to right clicking and
> 'renameing'
> the class name.
> Thanks again,
>
> --
> Terry
>
>
> "CMM" wrote:
>
>> This doesn't happen (to me) if I just simply rename the class directly in
>> the code editor (as I described). DON'T do a Refactor! Symbolic Rename...
>> because, yeah, that will do what you describe.
>>
>> "Terry" <(E-Mail Removed)> wrote in message
>> news
1538343-8779-4098-95EE-(E-Mail Removed)...
>> > Ok, this *ALMOST* did it! One important step you left out - exclude
>> > the
>> > original form from the project and then open the code behind and rename
>> > the
>> > class. Else, it gets renamed in both forms, leaving you with the same
>> > problem of 2 classes with the same name in the project. I had tried
>> > all
>> > the
>> > of the methods mentioned in the thread, this seems the best if you want
>> > to
>> > keep some of the code behind, data bindings etc.
>> >
>> > Thanks,
>> > --
>> > Terry
>> >
>> >
>> > "CMM" wrote:
>> >
>> >> Select the form in Solution Explorer, right-click and hit Copy. Then,
>> >> select
>> >> the project in Solution Explorer, right-click and hit Paste. Before
>> >> opening
>> >> the newly created copy, hit View Code in Solution Explorer and rename
>> >> the
>> >> class.
>> >> That's it.
>> >>
>> >>
>> >> "Terry" <(E-Mail Removed)> wrote in message
>> >> news:A6E908AD-CCDA-4BA5-8C57-(E-Mail Removed)...
>> >> > Hi,
>> >> > Is it possible (w/o generating a gazillion errors) to copy a form
>> >> > in
>> >> > VS
>> >> > 2005 so that it can be modified and reused. In other words, I have
>> >> > a
>> >> > form,
>> >> > alot of which I wish to use in a different form. An no, I don't
>> >> > want
>> >> > to
>> >> > inherit it. I just want to steal the layout and add and remove a
>> >> > few
>> >> > other
>> >> > pieces. Any easy way to do this?
>> >> >
>> >> > --
>> >> > Terry
>> >>
>>