Need help with VS 2019 Community

I was following the info on this link

https://social.msdn.microsoft.com/Forums/windows/en-US/a9529502-6304-4aa6-90ee-0757ab258d87/create-c-windows-forms-application-in-visual-studio-2017?forum=winforms

to create a C++ GUI using VS 2019 Community. The link uses VS 2017, and things changed in VS 2019 making the tutorial there useless.

Everything is cool right up to the point where I add a new item> I don't have UI or Windows Form to choose from.

If anyone here uses VS 2019 Community for C++ GUIs, I'd appreciate some help so I can do the same.
Hey Furry Guy.

Nice stuff. And it got me closer than I've been able to get. BUT, after starting a new win forms project, I get no form or anything in the Projects window. I get nothing. Totally blank.

https://i.imgur.com/ifaeoO7.png

https://i.imgur.com/hDQBJVr.png

https://i.imgur.com/wPlkfI4.png

Is there something more I need to do?
I don't use WinForms at all. I am an old nuts & bolts down-to-the-bare-metal Win32 API kinda guy. So, I can't offer any advice. Helpful or otherwise.
Thanks for your help. I appreciate your effort.
Its a sad day when the IDE prevents one from writing one's first GUI Windows program...

http://lambda-the-ultimate.org/node/1084

I'm with Furry Guy. Perhaps even worse though. All I use is the compiler/linker and I build from the command line. I expect that could be done with Win Forms (which I've never used). Years ago when I was looking at vb.net and C# I built those programs from the command line. At least one gets to understand how everything works under the hood. Then if one later decides to use an overweight IDE, it'll all come together. I know I'll get a lot of negative feedback on this opinion of mine. I can take it in stride.
I'm with freddie1.
I use only batch files!

James
<removed content>

EDIT thought question was about a C++ GUI... (not C++/CLI)
Last edited on
@freddie1,

MSVC can create from scratch a Windows GUI program. Win32 desktop, MFC, .NET or WinForms. There are a number of ways to create a GUI for Windows.

Even though the IDE can create a GUI from scratch, a template project actually, it adds in a lot of useless filler code and files I don't use for my programs.

I do use VS 2019. I usually start with a blank project and add what I need. I use the IDE to manage the files and builds, and make the inevitable debugging easier to handle.

Interesting thing about Petzold. He is THE programming dude for Windows. His various editions of "Programming Windows" are the bibles for Win32 API.

Until his 6th edition when he went all C# and Winforms, as if desktop programming was obsolete. IMO it isn't.

The rant by Petzold is from 2005, when VS was not the VS it is today. VS in 2005 was a hot mess PITA. Visual Studio 2019 does have its problems, as do ALL IDEs. It is less painful to work with than previous versions. Even VS 2017.
Last edited on

Everything is cool right up to the point where I add a new item> I don't have UI or Windows Form to choose from.


The installation process for Visual Studio keeps getting more and more complicated because of all the various coding technologies it supports. One has to be really, really careful with the screens that allow one to choose what and what not to install. If one leaves something out that is required for the kinds of programs or libraries one is using, one will be SOL in trying to get the IDE or associated code generation tools to work.

I only installed VS 2019 Community a couple weeks ago, but I found it worked OK for auto-generating code for a Win32 Api SDK program. I can't speak for anything else, because, if I recall, I tried to leave out as much related to the .NET Framework and everything else I don't use.

Perhaps if the original poster reruns the installation program again and installs everything, if that is not what was originally done, it might solve the problem. Just a thought.

Last edited on
@freddie1, I am like you, only installing the parts of VS I want to use. What truly surprises me is C++ is an optional install that is not originally selected when doing the initial install.

There were parts I wish I didn't have to install, but other features I wanted required them. Overall, for me at least, I have installed the workloads and individual components I use and need.

One thing to note about VS 2019. IMO tt is leaner than VS 2017, more responsive than the previous IDE and does it's work what seems to be marginally speedier than 2017. Plus, 2019 is SLO-O-O-O-O-W-W-W-L-L-Y being updated with C++20 features with each new update. Still not 100%, of course. But then the standard isn't yet officially released that I know of either. Finalized, yes, but for the last minute haggling, but still not "the" standard.

WinForms is part of .NET. EE-YUCK! That may be the direction MS wants Windows programming to go, but I will avoid it for as long as I can.

What truly surprises me is C++ is an optional install that is not originally selected when doing the initial install.


I found that out the hard way with VS 2015. I had to come here to ask you folks what was going on.

Does WinForms use the C# compiler, cs.exe I believe? Or no?
WinForms is .NET, so it primarily uses C#. Though it theoretically can use C++.

Not that I know this from any actual usage experience. I don't have the workload(s) installed.

I use the IDE primarily from start to finish so what compiler is invoked behind the scenes I don't have a clue. I am a self-taught C++/Win32 hobbyist. I have only recently been very briefly mucking around with other compilers at the command-line. MSYS2 MinGW.

I've found MSDN tutorials that supposedly show how to do MSVC or .NET command-line, but I can't quite spend the time to actually do the testing.
The whole point of .NET is that you can write in any compliant language, including C#, C++/CLI, VB.NET, and F#

List of CLI languages
https://en.wikipedia.org/wiki/List_of_CLI_languages

The C# compiler is csc.exe and is part of the .NET framework which can be found in:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
And also, on 64-but systems:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319

(version 4.0 build 30319 is the original release of .NET 4.0, but the version found in the folder should be rather newer.)

You can run csc.exe from the command line easily enough, which I find handy when I'm writing small apps. It's especially handy if you need to write a utility to check something on a Windows PC where there are no (other) build tools.

Command-line build with csc.exe
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/command-line-building-with-csc-exe

(For VB.NET code you can so the same thing with vbc.exe, and JavaScript with jsc.exe)

Microsoft's .NET frameworks are written at least predominantly in C# -- C#, .NET, the Common Language Runtime (CLR) and Common Intermediate Language (CIL) all co-evolved after all. If you're interested, check out:

.NET Platform -- Home of the open source .NET platform
https://github.com/dotnet

Andy
Last edited on
Well, Andy that is more than enough info that reinforces my dislike of .NET. I prefer to not need a run-time library that can be out-of-date.

MS tried to redo a JVM clone and missed the mark IMO.
Thanks for the input. But I've already gone back to Qt, which works as intended, right out of the box. I only wanted to check out VS 2019's Intellisense. But Qt's works just as good. And without all the BS.
Registered users can post here. Sign in or register to post.