How do I rename the name of already created Windows Form? Currently, its default name is Form1
and when the application runs its name is shown in the top-left side of window. How do I rename this text to MyForm
?
Refactoring changes the name of the .cs files, but the text in window does not change. Moreover, I tried to change default icon of the form by using Project->Properties->Browse to the location of the .ico file
, but the default icon didn't change. Why doesn't that work?
You would need to change the Form's Text
property;
This can be done VIA the properties or within code;
Or (from the constructor)
this.Text = "MyForm";
Hope this helps?
在设计器模式下更改窗体的Text
属性。
在设计器模式下更改窗体的Text属性 。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.