Create your first C++ GUI Windows Form using Visual Studio 2022 (Getting started)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome guys to this interesting session of C++ Yes you heard it right today we are going to start C++ GUI graphical user interface with Visual Studio 2022 in our classes in our older year we are doing some black screen G C++ coding right it was very boring but now we can use Visual Studio to create a GUI interface or graphical user interface using C++ how we can do this let's get started before starting the session guys if you are new to my channel hit the Subscribe button and ring the bell icon for future notification so that you will not miss my future videos and if you ended up liking this video give me a like and share this video with your friends your comments and suggestions are acceptable and your comments or suggestion always encourage me to post more videos so please give comment and suggestion so for today's session I'm going to create a new project of Visual Studio 2022 here create project you need C++ Windows development if you don't didn't install till now so you can click on install more tool and feature in this part you can see the C++ desktop development I will let you know so you can see I have already checked in that one installed C++ if you check this one and you need to check C++ CLI support okay I already installed so I'm not not doing any installation for now but you need to install this desktop development with C++ and C++ CLI support okay so now I'm going to create a project and the project will be called CLR if I type CLR project type so you can see CLR Mt project. NET Framework so I'm going to create NET Framework click on next so here I'm giving let's choose first CPP app or C++ app click on create it is using NET Framework 4.5 for now click on create it will create a blank solution for us if you go to solution Explorer you can see there is completely blank so here we will add our first form right click on the project add new item okay we our project is done to configure the Windows desktop mode we need to do one more step here go to the project section go to the properties here go to Linker system subsystem here you can give Windows Advance entry point you can give main Okay click on okay so you can see it is added here now right click add new item on the project UI I'm adding a Windows Form so I'm giving that name as main form. H in C++ it will call the header file or H file so sometime the UI will directly open or sometime it crash so just close the page and try to open the UI from here again yeah the UI is coming right we can run this from here this is the first time I'm running so it will open me a UI window okay I don't I didn't create a main method so I need to create a main method how I can create a main method you can see in the source file main. CP main form. CPP has been added double click okay you need to write this much of lineup code actually I'm I'm doing copy paste I will give in the video description also namespace system namespace windows. form here our project name so our project name will be first CPP app and M main form we created main form and this is our main method or entry point of the application which we configure in our project properties okay so if we do here right click properties Linker Advance option entrypoint main method so that main method we create in our main form. CPP now run the application it will open our gu GUI Windows guys nowadays it's very easy to create C++ software right it created through C++ let's see how we can design something I can select the windows and I can give the background or anything okay I can give maximize box false minimize box false and if you come to toolbox here here there is label so in the lbel I'm adding something like com contract talkx form so I'm giving full name you can do here font bold okay you can do copy paste full name here I can give that one to email ID and I can give mobile number next we can add text box here so I have added a text box here copy paste paste done let's give the name here so this will be our txt name email and txt mobile next we can give a button here so here I am giving two button one is submit button and one is cancel button so here this one is reset I can give the button name as BTN reset and this will be as BTN submit here we can give submit right now we can small down this now I can do validation also how first I will do clearing this field how we can clear just we need to add listener or event to this button to add listen listener or even just double click on the tools or control you can see one listener is added here here we can write like this this extend to txt email. text equal to blank same thing I can do for remaining Field txt Mobile txt name it will reset my field okay next thing is going to submit button here I can give my validation if this txt name. text so I can write doam equal to equal to blank here I can write message box dot so name validation so message box button do okay message box icon do error right same thing I can do for else if this will be txt email and this will be txt mobile email ID and mobile if everything is entered then it will go to lse part and in the else part it will show us a message it will show us a message a success message so it will be like data successfully and here will be success and the icon should be information right now run the application so we have added validation we have already form reset button also now run the so our form is created so if I adding some something here if I click reset it is setting submitting please enter name please enter email ID please enter mobile number that submitted successfully right so in this session we can see we we see how to create a Windows form using C++ how to add some text box and tools like submit button reset button and how to do validation through if El if and how to do reset in our coming session we're going to see the same form I will not create any Pages any any project I'm I'm going to add a data grid view I'm going to create a crowd operation through SQL Server so guys please stay tuned tomorrow I'm going to create a video to integrate SQL server and if you like this session give me a like share this video with your friends thank you very much
Info
Channel: Biswa Ranjan
Views: 3,895
Rating: undefined out of 5
Keywords: c++, windows forms application, visual c++, c++ tutorial, c++ programming, learn c++, windows forms, c++ windows forms, windows form vs2019, vs2019, windows forms c++, clr/c++, clr/c++ windows forms, windows desktop, visual c++ tutorial, c++ gui, create a program in c++ with gui, c++ gui tutorial, c++ windows form tutorial, vs 2022, winforms, c++ winforms, windows forms c++ visual studio 2022, Learn Programming Online, LearnProgrammingOnline, C++ for beginners, C++ Development
Id: AINCOpXma6M
Channel Id: undefined
Length: 11min 29sec (689 seconds)
Published: Thu Nov 02 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.