Resolved Which VS C# project type creates Form1.resx?

bhs67

Well-known member
Joined
Oct 11, 2021
Messages
52
Programming Experience
10+
I switched to WPF many years ago ... do not recall which project template I selected that creates: Form1.cs ... Form1.Designer.cs ... Form1.resx.

File => New => Project => ???
 
Solution
Take the following with a big grain of salt since I've not used the WinForms Designer since VS2010. I believe that if you try to set the icon for the form with a custom icon, or put in a picture box with a custom picture, the Designer will automatically create the .RESX file for you. Or you could just explicitly add a resource to the project and it'll also create a .RESX file for you, but I think it'll be ProjectName.resx, instead of Form1.resx.
WinForms, not WPF prefers to create .RESX files by default when you add resource. In general, though, with any project type you can add a resource and .RESX files will also be generated.
 
I understand. Which WinForms project template automatically creates: Form1.resx. I've tried a variety of Windows Forms App (.NET Framework) to no avail. I'm doing this to follow a YouTube Tutorial.
 
Take the following with a big grain of salt since I've not used the WinForms Designer since VS2010. I believe that if you try to set the icon for the form with a custom icon, or put in a picture box with a custom picture, the Designer will automatically create the .RESX file for you. Or you could just explicitly add a resource to the project and it'll also create a .RESX file for you, but I think it'll be ProjectName.resx, instead of Form1.resx.
 
Solution
That's it! Dragging a button onto the form creates the resx. I did not remember that ... too long ago. Thanks!!!
 
Back
Top Bottom