Create Your First C++ Windows Form using Microsoft Visual Studio 2022

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • How to create CLR C++ project using Microsoft Visual Studio 2022. Create C++ User Interface (GUI) using the .NET Framework.
    How to Install Microsoft Visual Studio 2022: • How to Install Microso...
    ************************
    Free Document Proofreading : grammarly.go2c...
    Source code of the main method in the first comment .
    ***********************************
    🔥 Complete Udemy Courses :
    ASP.NET MVC Course : www.udemy.com/...
    ASP.NET Course : www.udemy.com/...
    ASP.NET Core Web API : www.udemy.com/...
    React JS : www.udemy.com/...
    ⬇️ Free Document Proofreading ⬇️
    ► Grammarly : grammarly.go2c...

Комментарии • 184

  • @BoostMyTool
    @BoostMyTool  2 года назад +58

    #include "MainForm.h"
    using namespace System;
    using namespace System::Windows::Forms;
    void main(array^ args)
    {
    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false);
    FirstCppProject::MainForm form;
    Application::Run(% form);
    }

    • @adansalman6917
      @adansalman6917 2 года назад +3

      I have done each and everything you said but it is giving my linking error can you help?

    • @Iamfoxbrown
      @Iamfoxbrown 2 года назад +1

      I was forgetting this important detail and the msg it was "unresolved external symbol" but after Added these lines worked perfectly. Thank you !!!!

    • @andycobra49aor
      @andycobra49aor 2 года назад +3

      Mr. BoostMyTool;
      Please, Please if I need you help can you please help me, I am good but need help, once I get the hand of it I will do it myself. Believe me, you are a great instructor, it is very hard to find someone with that great talent like yourself that can even respond fast, not like some folk out there that it takes for ever. I would it do the same for you in the near future. If you have an specific channel in RUclips, let me know, I will enroll with your channel to get better. the problem is that I was in the military long time ago, deployed 3 times and my brain is not the same. I have too much anxiety, and depression and difficult to focus sometimes. I was a great coder in C and C++, I have lost interest in things. Hope you understand. That's why I am always looking for someone like yourself that it takes time to message and help other, thanks for everything you DO, is so important to people like myself, thanks.
      Respectfully;
      Andy
      Disable Vet
      Texas

    • @fleimi
      @fleimi 2 года назад

      @@adansalman6917 Remember to change the line FirstCppProject::MainForm form; FirstCppProject have to be changed as your project name is.

    • @lapisbrainprint9607
      @lapisbrainprint9607 Год назад

      For some reason it throws me an unhandled exception error code System.InvalidOperationException after Application::Run(% form);

  • @rscgln
    @rscgln Год назад +10

    The ONLY place where I found clear, right and up-to-date guidelines to start with this tricky development system. Thanks!!! Sad to think at the old and glorious VB5 times, where in seconds you could write a working application!

  • @maxmaurer2989
    @maxmaurer2989 2 года назад +53

    This was EXACTLY what I needed. I'm an experienced programmer coming from a different IDE. This showed me EXACTLY how to set up the Visual Studios IDE for windows programming. I would NEVER have figured out how to do that by myself. Because of skyrocketing prices, extremely restrictive support, and continued extremely buggy operation of my previous IDE, I VERY MUCH wanted to get off of it BADLY. I ACHED to get onto Visual Studio. The one thing stopping me was: I couldn't figure out HOW to get windows in VS. The detailed instructions here fixed that. I am now back to "regular programming" with my current project. It took some time but it was WELL WORTH IT! THANK-YOU (a THOUSAND TIMES!!!!)😎🖕🙏🙏🙏

    • @coldblackice
      @coldblackice 2 года назад +1

      What was your previous IDE?

    • @WyMustIGo
      @WyMustIGo Год назад +1

      @@coldblackice Probably Open Sores (SIC)

    • @LayTheNess
      @LayTheNess Год назад +6

      why would you give him a f*ck-emoji tho ^^'

    • @DeadManRising36
      @DeadManRising36 Год назад +1

      @@LayTheNess I think its a typo ;)

    • @mynameisname6162
      @mynameisname6162 Год назад +2

      @@coldblackice vim

  • @oladunk4293
    @oladunk4293 Год назад +8

    In my opinion the best tutorial for a newbie like me. Thank you!

  • @averagetomas5755
    @averagetomas5755 Год назад +3

    This was great, for someone who hasn't used visual studio very much this was coherent and easy to understand.

  • @brock2k1
    @brock2k1 2 года назад +9

    Just what I was looking for. Please keep posting your excellent tutorials.

  • @md.jannatulnayem4328
    @md.jannatulnayem4328 2 года назад +3

    I've in working on windows forms for quite a while but all those were written in C#....this is the first time I'm doing it in Cpp...loved the content....expect more C++ videos in future 👊

    • @vector5911
      @vector5911 2 года назад

      working on what?your free youtube channel xD? You will never amount to nothing because your a indian poor

  • @mohamadmaleki3026
    @mohamadmaleki3026 2 года назад +7

    I've done all the way you explained and it worked for me very well. Thanks.

  • @amalboumen9622
    @amalboumen9622 Год назад +5

    omg that was soo clear and helpful , we need more tutorials like thiis you're amazing

  • @billwilson6670
    @billwilson6670 2 года назад

    Just learning c++ and this is the best video I have found on this topic.

  • @ralphgehteha9924
    @ralphgehteha9924 Год назад +1

    THX! Essential video. I really don't know why MS makes it so longwinded and complicated to kick off a project as easily as with VB.

    • @rscgln
      @rscgln Год назад

      I have an answer to this, but I cannot write it "politely"...

  • @wakeelfurqanahmed2940
    @wakeelfurqanahmed2940 2 месяца назад

    was looking for the workload, thankfully this video has

  • @sousra5080
    @sousra5080 Год назад +1

    I am speechless, it's too good to be for real. Big thanks

  • @anchorsites4158
    @anchorsites4158 4 месяца назад

    explained each and everything in an excellent way

  • @starttoday1522
    @starttoday1522 Год назад

    Finally I run my first windows application ❤
    Thanks sir

  • @Augustinevlog
    @Augustinevlog 2 года назад +4

    Damn, you're a good teacher 👏 🙌 ❤

  • @STEAMChannelOfficial
    @STEAMChannelOfficial 6 месяцев назад

    Good video! in the later version (in 2024) you dont need to restart to view designer.👍

  • @beatifulkoala3406
    @beatifulkoala3406 2 года назад +1

    This is the best explaind video about WinForm! Thank you!

  • @DemonDNF
    @DemonDNF Год назад

    Excellent! I had 3 mistakes, but I found them after tearing my hair out for 20 minutes. :)
    The suggested variable names offerred by VS is a great way to make sure we're using the proper spelling (DARN CASE ERRORS).

    • @DemonDNF
      @DemonDNF Год назад

      Couldn't figure out why I kept getting a link error for "main".
      An hour later, might as well read the comments and there you are; I had typed it as Main in linker. :D
      Thanks!

    • @g51661
      @g51661 Год назад

      I am getting build error and internal compiler error . Can u help in this?

  • @juanpalacios6251
    @juanpalacios6251 2 года назад

    OMG bro, thanks, you save me from a teacher from my U, he uses an old version

  • @holden_71
    @holden_71 Год назад +1

    What a nice tutorial!
    Thank you so much!
    Keep on updating.

  • @salehahmed3687
    @salehahmed3687 2 года назад

    thank you man, I have search for one hour to find like this video

  • @mohamadmaleki3026
    @mohamadmaleki3026 2 года назад +1

    I'm waiting eagerly for your next video on subjects similar to this one. Visual Studio C++ Window Form / thanks a lot

    • @BoostMyTool
      @BoostMyTool  2 года назад +1

      next video will be on login/registration forms and is expected for 25 december

    • @BoostMyTool
      @BoostMyTool  2 года назад

      This is a new video on login form: ruclips.net/video/N1DarSDMVWo/видео.html

  • @SuvobrotoPal
    @SuvobrotoPal 10 месяцев назад

    Thank you very much for such a nice video , From Kolkata City, India 🙏🙏

  • @adityarajamani93
    @adityarajamani93 2 года назад +3

    it says i have an error in line 1
    i.e the #include "MainForm.h"

  • @user-xz7hx2ss2f
    @user-xz7hx2ss2f 4 месяца назад

    Thank you! the video is very helpful

  • @user-kj5nt6cm7i
    @user-kj5nt6cm7i 6 месяцев назад

    fantastico !! Microsoft makes everything sooooo complicated !!

  • @AlbertDongler
    @AlbertDongler 9 месяцев назад

    Superbly useful. Thank you !!!!! 🙂

  • @flakesnow492
    @flakesnow492 3 месяца назад

    成功了老哥感謝

  • @animazmishvili2960
    @animazmishvili2960 2 года назад +1

    My 🦸‍♂️ hero! Thanks 🙏🏻👌🏻👍🏻

  • @the_simone
    @the_simone 2 года назад +1

    This helped me a lot. Thank you!

  • @giro2504
    @giro2504 Год назад

    Very much appreciated. Thank you in advance!

  • @alishafii9141
    @alishafii9141 Год назад

    thanks a lot.continue this way and good luck

  • @matteoverardo8005
    @matteoverardo8005 2 года назад +2

    Great video, thanks. What is the purpose of "this->"? I followed step by step your video but I did not use "this->" and the app works well anyway.

    • @BoostMyTool
      @BoostMyTool  2 года назад +6

      'this->' allows us to access the class variables. it is useful if you have local variables with the same name as global variables.

    • @irfansari_
      @irfansari_ 2 года назад

      go learn object oriented programming in c++

  • @Themandalorian2030
    @Themandalorian2030 2 года назад

    I adore you BROOOO thank you for the the video

  • @achiltsompanos447
    @achiltsompanos447 Год назад

    Oh man…, it looks like it’s easier to achieve lift off with the space shuttle!

  • @creativehuman3d383
    @creativehuman3d383 2 года назад

    thanks men your video is awesome i learnin much

  • @ApoorvSaxena8
    @ApoorvSaxena8 2 года назад

    very useful video I created my first form. please upload advanced version of this to create more applications.

    • @BoostMyTool
      @BoostMyTool  2 года назад +1

      thanks. I want to create many more videos in the next few weeks. For the moment, you can check this video on login/registration forms : ruclips.net/video/huCyyUVYk3g/видео.html

    • @ApoorvSaxena8
      @ApoorvSaxena8 2 года назад

      @@BoostMyTool Thanks i am watching

  • @malicianewowlala6655
    @malicianewowlala6655 Год назад

    Very good tutorial. Thanks a lot.

  • @sinakhosravi1861
    @sinakhosravi1861 Год назад

    Thank you so much
    That was great

  • @berrimamouheb9472
    @berrimamouheb9472 2 года назад +1

    very good tuto, thank you

  • @Wan_Destroyer
    @Wan_Destroyer 2 года назад

    It work thankkkkkksssss my First c++ project

  • @taddyriveros6444
    @taddyriveros6444 2 года назад

    me ayudaste arto, gracias desde latinoamerica :)

  • @millenia2222
    @millenia2222 Год назад

    Good video, should make one with errors and fixes

  • @derrickcannor4187
    @derrickcannor4187 2 года назад

    YOU ARE A LIFE SAVER

  • @user-ir5wj6tq5w
    @user-ir5wj6tq5w 6 месяцев назад

    cool video)

  • @festuskoech6125
    @festuskoech6125 2 года назад

    Thank you so much. Amazing and understandable.

  • @tekklov2646
    @tekklov2646 Год назад

    Thanks this helps me

  • @sugonmadyik6222
    @sugonmadyik6222 2 года назад

    thanks for the tutorial

  • @andycobra49aor
    @andycobra49aor 2 года назад +1

    Mr. BoostMytool
    How are you? I have download the compiler and installed. It works great so far but I have not ran the program yet, I will do it today, If I have some problems I hope you can help me out PLEASE. I was looking for a software like this one, similar to the Visual Studio Express 2013, and I found it because your great job in posting it in RUclips. Again Thanks for the great job, if I need some help, please I really appreciated. I do enjoy coding and make applications that connect in the internet. Anyways, thanks
    Respectfully;
    Andy
    Disable Vet
    Texas

  • @morriscianfriglia1204
    @morriscianfriglia1204 Год назад

    Great job Bro 💪💪💪🤙😀

  • @smaugcow
    @smaugcow 2 года назад

    Thanks very much!!!

  • @chunchunmaru6832
    @chunchunmaru6832 2 года назад +1

    I'm still confused, what are the documentation that I can refer to for this type of project? is it C#? is it CLR? is it C++ or is it .NET programming language?
    What if I just want to create a simple if..else function that looks for the string "Rambo" in the First Name, it will pop different messagebox.
    I'm confused
    🤔

  • @samkelo_m_
    @samkelo_m_ 6 месяцев назад

    Danke Bruder🫡

  • @leonardofreedy9551
    @leonardofreedy9551 2 года назад

    Help me pls?
    MSIL module encountered; incremental linking is disabled for MSIL; performing full link
    fatal error LNK1306: DLL entry point "void __clrcall main(cli::array^)

  • @camaro24pl
    @camaro24pl 2 года назад

    Thank you very much ! ;)

  • @stockanalogy8108
    @stockanalogy8108 2 года назад

    Everything is fine I am unable to connect sqlite database, and there is no sufficient tutorials on this, everyone is showing on cli project only. i think I need to go back to python for the project. I dont have much knowledge of c++

  • @andycobra49aor
    @andycobra49aor 2 года назад

    Mr. BoostMyTool;
    How are you sir? I was waiting for long time to find someone like your self that show a video education like this one with C++/C Windows Form Visual Studio 2022. The reason why is that I used to have 2013 C/C++ Visual Express which makes it easy to program because when you select new project, it built its own Form window which the only thing you have to do is to place the object in the window, select them, and write the codes in it. Now, can you please help me to setup or point me in the right direction to install, setup Microsoft Visual 2022 C/C++ the same way that you have it to make it easy to build windows program. Thanks for your help and dedication, I will be waiting in your answer, thanks.
    Respectfully;
    Andy
    Disable Veteran
    Texas

    • @BoostMyTool
      @BoostMyTool  2 года назад

      Hello, you can follow this video for the installation steps of visual studio: ruclips.net/video/6pjzYcrlhx0/видео.html

  • @user-ib8mu1vt5x
    @user-ib8mu1vt5x 9 месяцев назад

    Basics of programming

  • @xkiller786
    @xkiller786 Год назад +1

    hello sir. what u did in video after time 10:46. how u get a script

    • @S4IM_110
      @S4IM_110 Год назад

      Yeah, I’m stuck here too

    • @billnorton5043
      @billnorton5043 Год назад

      I think he cut and pasted it from somewhere like Notepad. I just carefully typed it in and it worked.

  • @user-su9hb4qh4g
    @user-su9hb4qh4g 2 года назад +1

    Хоть и не по-русски, но наглядно и информативно!)

    • @thefaisal6471
      @thefaisal6471 Год назад +1

      А пусть русский учит, полезно будет этому индусу, который кроссовки мне шил

  • @xurshidqandiyorov92
    @xurshidqandiyorov92 2 года назад

    thank you very much

  • @arphaksad01
    @arphaksad01 Год назад

    Code is not compiling. Never mind. The fix to link errors and such is to add the code that BoostMyTool posted in the MainForm.cpp file.

    • @KatlegoMmadi
      @KatlegoMmadi Год назад

      Bro please expand .I'm also having the same problem when running the program

  • @mujgankanal9848
    @mujgankanal9848 2 года назад

    I am trying to make a quiz but I can’t… can you upload a video about making a quiz in visual studio with c++ ? That’s my final project and I can not find any video about it🙏🙏🙏

  • @Noet-bm2vg
    @Noet-bm2vg 3 месяца назад

    Why I can't add anything from the toolbox to the form? Please help me!

  • @marccastlerock6997
    @marccastlerock6997 2 года назад +1

    for me : Error LNK1104 cannot open file 'ucrtd.lib'

    • @marccastlerock6997
      @marccastlerock6997 2 года назад

      i add the right folder in library directories that miss. :D

  • @leonardj.sparks9348
    @leonardj.sparks9348 Год назад

    my toolbox on VS contains only a couple of tools. Someone can tell me how can i update them? thanks

  • @dantocvn1
    @dantocvn1 2 года назад +1

    It is a great video and thank you for sharing it.
    So if I just want to write the first and the last name to text file, how to do that?
    I think the String^ first name is an object? I am new with C++ so willing to learn it. Thanks

    • @BoostMyTool
      @BoostMyTool  2 года назад

      you can see section "Write a Text File" of this link: docs.microsoft.com/en-us/cpp/dotnet/file-handling-and-i-o-cpp-cli?view=msvc-170

  • @js3863
    @js3863 2 года назад

    The code is automatically there you don't type and explain what is that codes for ...

  • @bopthing1
    @bopthing1 2 года назад

    when i launch the program, there is nothing on my window. is there any way to fix this?

  • @adityarajamani93
    @adityarajamani93 2 года назад

    I am getting an error as "Entry point must be defined" How do i fix tht

  • @Scorpio-ed7sj
    @Scorpio-ed7sj 2 года назад

    i develop a gui application by clr c++, but it is not running on any other pc, i have included all .dll files. some error with code 0xc0000007b

  • @anlpereira
    @anlpereira 4 месяца назад

    Hi, every time a click the button to add a new UI the Visual Studio crashes. What could be?

  • @anojann100
    @anojann100 Год назад

    Im getting an error "object reference not set to an instance of an object"

  • @bimanchatterjee7001
    @bimanchatterjee7001 2 года назад

    good tutorial

  • @tonysinclair3265
    @tonysinclair3265 2 года назад

    Great tutorial, but why does VS give an error and make you restart every time you create a new project?

  • @edwinelowsson9538
    @edwinelowsson9538 2 года назад

    Hi the first time I tried this I got this error.
    From the beginning, now it worked.
    But now I've tried several times again and the same error comes up.
    LNK2001 unresolved symbol Main FirstCppProject LINK 1
    LNK1120 1 unresolved externals

    • @vahn_legaia
      @vahn_legaia Год назад

      Did you find a fix? I have the same errors.
      Edit: Inside MainForm.cpp I had to add a bunch of code.. make sure to change the CHANGETHISTOPROJECTNAME part to your project name
      using namespace System;
      using namespace System::Windows::Forms;
      [STAThreadAttribute]
      void Main(array^args){
      Application::EnableVisualStyles();
      Application::SetCompatibleTextRenderingDefault(false);
      //put Project name below
      CHANGETHISTOPROJECTNAME::MainForm form;
      Application::Run(% form);

  • @donovanpayne1587
    @donovanpayne1587 Год назад

    when I try to use #include in my cpp source file I get errors connected to the code in your pinned comment. Very new to this not sure why this is happening

  • @andycobra49aor
    @andycobra49aor 2 года назад

    Mr. BoostMyTool;
    How are you again? hope you are doing fine and educating more folk out there. Can you educate me more about the meaning, VOID, PRIVATE, PUBLIC PLEASE? I know I can do it myself but I am sure that a professional, master like you with a lot patience can explain more how that work with examples if not, what videos I can watch that way I can have more understating how it work, the meaning in the C or C++ coding. Thanks for the great dedication, and patience.
    Respectfully;
    Andy
    Disable Vet
    Texas

  • @rino19ny
    @rino19ny 2 года назад

    1. maybe you're using a preview version because as of June 2022, there is no properties for the TableLayoutPanel.
    2. please do not do copy and paste. where did the code in 10:50 come from?
    3. don't do shortcuts. explain everything seen on the video.

  • @mrtaluspa9903
    @mrtaluspa9903 Год назад

    Thanks

  • @AliAkbar-kz3mv
    @AliAkbar-kz3mv 2 года назад

    very nice

  • @LordDrw
    @LordDrw 2 года назад

    Thank you, I was looking for this tutorial soooo much. Debugworks great, but If I want to Release, I click build->cleanproject, than build->buildProject, set to release and start.. I have one error: LINK1561 entry point must be defined. Could you plese help with this. I used google to find solution, unfortunately it didn´t help m... :(

    • @LordDrw
      @LordDrw 2 года назад

      I solved, Don´t know why, but properities was clear. If next one has same problem. CHECK PROPERITIES

  • @Vlingn
    @Vlingn 8 месяцев назад

    I followed the video exactly but after running it I got the message: ''Unable to start program 'C:\User\TCP\source
    epos\Project1\x64\Debug\Project1.exe'
    The system cannot find the file specified''
    Please guide me!!!

  • @iteeshollow
    @iteeshollow Год назад

    LOL, ive got an error and cannot find it. I think is missing } someplace, as it complains about that yet when i add one, im not adding it in the correct location. I guess ill start all over, which in real isnt the way to go about finding the error! but i have no idea how to trace it.... i do know its in the header file, the main says string doesnt exist. yeah.

  • @mahdoutn1260
    @mahdoutn1260 2 дня назад

    mr7be bweld bledi :)

  • @ayoubfodil9506
    @ayoubfodil9506 2 года назад

    What about c++ design desktop app how is it?

  • @sabadvali9322
    @sabadvali9322 Год назад

    how do i get textbox string input from h file

  • @jotaefedev
    @jotaefedev Год назад

    Hi dear, you have worked c++/clr for Http Post Request ??

  • @Luix
    @Luix Год назад

    So if this is so automatic why is MyForm.cpp empty?

  • @awesomeasadbro
    @awesomeasadbro 2 месяца назад

    can u make hostel accomodation system on visual studio GUI

  • @marc-andreduval403
    @marc-andreduval403 2 года назад

    i got the error code c4829 and the application won't start

  • @anisurrahaman7165
    @anisurrahaman7165 2 года назад

    When i create multiple cpp file under source file then my code can't run.. means second code can't run... as well as when i press Ctrl + F5 to run the code then program crash... Please help to fix this problem....

    • @BoostMyTool
      @BoostMyTool  2 года назад

      You can create multiple cpp files, but only one file can contain the main method. In this new video, I created 3 cpp files: ruclips.net/video/N1DarSDMVWo/видео.html

  • @asadmahmood6724
    @asadmahmood6724 2 года назад

    Well, your skipped the coding part, Want to know how to code this !

  • @fluidmind3629
    @fluidmind3629 Месяц назад

    do i need to make this on every project ?

  • @RR-eq4jr
    @RR-eq4jr 9 месяцев назад

    Trying this with VS 2019 Community.
    I had to change void main into int main, otherwise it's not working.

  • @wastedkafir9134
    @wastedkafir9134 10 месяцев назад

    Your thumbnail title is misguiding. I came here to see c++ but this is NOT c++. this is CLR c++

  • @motasam8122
    @motasam8122 11 месяцев назад

    When I press run Microsoft visual Studio Display this message
    Unable to start program 'CUsers\ScsDocuments\cpApp\og in form Debug\log in form.exe
    The system cannot find the file specified
    Please make video how to solve this problem

  • @MrWitcher1
    @MrWitcher1 2 года назад

    Why microsoft removed c++ windows form application creation from new project section??? this way very complicated

    • @BoostMyTool
      @BoostMyTool  2 года назад

      They recommand using C#. The use of C++ is not adviced with .NET

  • @DavidMillsom
    @DavidMillsom Год назад

    I get link error because of unresolved symbol main