[Solved] VS2022 Not recognize form as a Windows Form

Javier Duran 20 Reputation points
2025-11-05T22:45:30.9666667+00:00

Hi, Im new to the forums and new into the VB.net world as well, i use to code in excel vba but i decided to made the jump to something newer and better. Iv been designing my app using the latest VS2022 version 17.14.19, using Windows Forms, i have 2 forms as u can see in the following

Screenshot 2025-11-05 160350

As can be seen, the main form shows up with the VB icon instead of the form icon, even if i right click on it the option for the designer doesnt show up, its not even in the open with option, but, for the other form works perfectly. Iv been researching on the internet for my issue but i havent been able to find a solution, so if someone can help me fix this so i can see the designer of my main form again id really apreciate it

When i build the app the form shows and everything works as expected, but i cant see the designer at all on my main form :-(

Developer technologies | Visual Basic for Applications
0 comments No comments
{count} votes

Answer accepted by question author
  1. Omkara Varshitha Kunapalli (INFOSYS LIMITED) 1,985 Reputation points Microsoft External Staff
    2025-11-06T04:37:46.95+00:00

    Hello hope your doing well

    Check the Form’s Inheritance

    Make sure your form class inherits from System.Windows.Forms.Form. Open the .vb file (e.g., FrmLog.vb) and verify the class declaration looks like this:

    Public Class FrmLog    
    Inherits System.Windows.Forms.Form

    • If Inherits System.Windows.Forms.Form is missing, add it manually.
    • Save the file and rebuild the project.

    Ensure Designer File Exists

    Check that the .Designer.vb file is present and correctly named:

    • It should be named FrmLog.Designer.vb and located under the main form file in Solution Explorer.
    • If it's missing, you can:
    • Right-click the form → Add → New Item → Windows Form → name it exactly as your form.
      • Then copy your existing code into the new form Verify Project Target Framework The Windows Forms Designer in VS2022 works best with .NET Framework or .NET 6/7/8 (not .NET Core below 6):
        • Right-click the project → Properties → check the Target Framework.
        • If it's below .NET 6, consider upgrading to .NET 6 or higher. **Clean and Rebuild the Solution
        **Sometimes cached data causes issues:
        • Close Visual Studio.
        • Delete the bin, obj, and .vs folders from your project directory.
          • Reopen Visual Studio and rebuild the solution. **Check File Properties
          **In Solution Explorer:
          • Right-click the form file → Properties.
          • Ensure Build Action is set to Compile.
            • Ensure Custom Tool is set to VbMyFormGenerator (for VB.NET forms). Try Opening Designer Manually
            If the designer still doesn’t show:
            • Right-click the .vb file → Open With → select Form Designer.
            • If it's not listed, click Add → browse to devenv.exe (Visual Studio executable) and try opening it that way. **Create a New Form and Compare
            **Create a new Windows Form in the same project:
            • Compare its structure, inheritance, and file layout with the problematic form.
              • This can help identify missing or misconfigured elements

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.