changing name

  • Thread starter Thread starter e-mid
  • Start date Start date
E

e-mid

i am working with a form, i used default name form1.cs when i opened the
project , now i want to change it but when i change the name on the
properties window of the mainform , it does not change?

how can i change this name?
 
e-mid said:
i am working with a form, i used default name form1.cs when i opened the
project , now i want to change it but when i change the name on the
properties window of the mainform , it does not change?

It seems that you want to change the filename. Just left-click on it and
change it (don´t forget .cs) or right click on it and click rename.
What you did is to change the name of the form that is used in code to
talkto / to identify the form;
if you want to change the caption of the form you need to change the Text
property of the form.

Hope I understood you right. Greetings,
Tim.
 
e-mid

1. First close your solution.
2. rename form1.cs and form1.resx to your desired name in the windows
explorer.
3. Open TestProj.csproj (for example) file in wordpad or some editor
4. replace form1.cs and form1.resx to the new name manually.
5. load your solution.
6. open newform.cs (for example)
7. rename class name to
public class newform:Form
{
8.rename the constructor to newForm.

You are set to go now.

Shak.
 
Kind of round-about. If it is a C# module that is NOT a code-behind,
there's no reason not to use the IDE to change the file name.

You will still need to do steps 7 and 8 within VS.NET.

--- Nick
 
yes, this is what i look for.

but i cant compile it now, i dont have c++ installed,
i will give a try as soon as i compile it.

thnkz..
 
Back
Top