Skip to main content

Introduction to C++ Form Programming Using Visual Studio (GUI)



Welcome to C++ Form Programming using Visual Studio 13


1. Open Visual Studio 13.

2. Go to File->New->Project.





3. Go to Visual C++ and choose CLR Empty Project.

4. After this go to :




5. Go to Visual C++ -> UI -> Select Windows Form.





Will Look like this ->




6. Now Right click on Project<your project number> ( mine is Project6 so i will select Project6) and select properties and do same as me.


7. Go to Linker and under this select System and then select SubSystem from menu and click bottom-faced arrow and select the same as below.



 8. Now, select Advanced, An Entry point row will come in menu and type "main" (without quotes).





9. Click Apply and Ok.

10. Now select your .cpp file from solution explorer in the right.
in my case its "MyForm.cpp"





11.Then type this code in your cpp file.

#include "MyForm.h"

using namespace System;

using namespace System::Windows::Forms;
[STAThread]

void main(array<String^>^ args) {



Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);

Project1::MyForm form;
Application::Run(%form);
}



Note - It is advisory that make a project as "Project1" at a different place so there will be no chances of errors.

 And if you changed the name of Project then you have to change the green highlighted line.



12. Save it and Click on "local Windows Debugger".





13 . Enjoy.Your First C++ GUI application is ready.





Comments

Post a Comment

Popular posts from this blog

Login Menu using C++ GUI

Hello Guys,                                   CREATING LOGIN FORM USING C++ This is bit long procedure so i would like to post only Video . Thank you Login Form C++ --->   

BODMAS / PEDMAS calculator

Parenthetical Calculator/ BODMAS Calculator/ PEDMAS Calculator             that works according to the bracket priority.                                     Simple Algorithm. Made with using 3 modules :-                                                                         1. Expression separation 2. Post fixing Algorithm 3. Expression Evaluation Written in C++ Language Output :-- Source Code : -- #include <iostream> #include <sstream> #include <cmath> #include <string.h> using namespace std; void tellpos (string a , int &a_ )  { if (a == "+" || a == "-") { a_ = 10; ...