[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

How to create a copy of a form in the same project?

How to create a copy of a form in the same project and rename it?

I copied a form and pasted it in the same project. Then I renamed the file name from the Visual Studio IDE. I also changed the form class name.

While compiling, I get this error:
The item "obj\Release\CommissionAgent.frmAllTaluks.resources" was specified more than once in the "Resources" parameter.  Duplicate items are not supported by the "Resources" parameter.

What should I do?
1 Solution
Try creating a whole new form and copy and paste everything inside the "public partial class ..." from both the form.cs and the form.designer.cs
Did you change the class nema in designer too?

Gautham JanardhanCommented:
u could also use inheritance

instead of inheriting from Windows.Form u can specify ur other form there

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now