0

To create a Windows Forms Application run the following command:

dotnet new winforms

An Application is generated with a Form that is implemented through the Form1.cs and Form1.Designer.cs files with the typical initial structures that can be seen, for example, in the commercial versions of Visual Studio (2017 or 2019)

All good, but certain doubts arise:

1 ° What dotnet Command should be used to add a New Windows Form to the current Project?

2 ° Although it is true it is relatively easy to create and associate Event Handlers, using code, is there a simplified way (such as when you double-click on a Control - this of course only in versions like Visual Studio 2017 or 2019-) to implement said Event Controllers and associate them with the Controls that you have to manage your Events?

I'm using Visual Studio Code 1.47 with .NET Core 3.1

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
Skar.2007
  • 9
  • 1
  • 3
  • 2
    There is no Windows Forms forms designer for Visual Studio Code. I recommend using Visual Studio Community. – Cameron Tinker Jul 23 '20 at 21:55
  • For both, no such solution is there for VSCode. It is still an editor primarily, so it won't have everything an IDE has (to echo the other comment). – Lex Li Jul 24 '20 at 01:59
  • 1
    See [differences between Visual Studio and Visual Studio Code](https://stackoverflow.com/q/30527522/2330053). – Idle_Mind Jul 24 '20 at 14:13
  • Sadly, Visual Studio's had a very buggy Forms Designer since, apparently, about 2010 or so. :facepalm: (I just tried to spin up a quick Winforms app and while the form displayed just fine, it kept dropping / NOT showing all the controls. Uber frustrating. – Scott Fraley Aug 15 '22 at 18:24

0 Answers0