Search code examples
c#vb.netformsconvertersdesigner

Convert form design from C# to VB


By accident I unknowingly started a new C# project instead of VB and proceeded to build a rather complex form in the designer. It wasn't until I wanted to start coding that I realized I selected the wrong language by mistake.

I was wondering if it was possible to convert my C# form design, or import it so it can be used (and written) in a VB.Net solution.

All my searches have come up with topics centered and focused around the main program code, which is not necessary for me because I haven't written anything yet.

I have tried to take the designer code and convert it with an online tool followed by starting a VB project and replacing the fresh form's designer code but that just ended up breaking it.

Any suggestions?


Solution

  • As per Plutonix's comment, the solution was found in copying the control objects in the form designer and pasting them in the new project. It was not a perfect representation, but the flaws were so minor it was easily made right.

    So simple!