C++ GUI: Create Simple WinForms App in 30 Seconds! | Sciber
Вставка
- Опубліковано 17 гру 2021
- I created a project template for creating a Simple WinForms Project in Visual Studio (a fairly easy task to do, but didn't occur to me to start off the series with this) and released it to the Visual Studio Marketplace for you to download and use yourself!
Download it right here: marketplace.visualstudio.com/...
Github Repo: github.com/thisismalindu/CppW...
Here's how to install and create the project and get started with WinForms in C++!
Please leave any issues and bugs with other versions like VS17 or 19 because I only tested this on 2022.
Download Visual Studio 2022 Community: visualstudio.microsoft.com/
Leave your ideas in the comments section below!
Facebook: (PAGE) sciber.web.app/fb
(GROUP) / programmingsrilanka
Instagram: sciber.web.app/ig
Telegram Community: t.me/wearesciber
Visit Us : sciber.web.app - Наука та технологія
Hi guys, recently I found a problem related to this project template thanks to your comments, the issue was that when we use this and use project resources, it starts giving exceptions. The workaround is to go all the way up to the namespace in MyForm.h and change $safeprojectname$ to your project name. Do this inside MyForm.cpp as well.
Then it works!
it finally worked;
I Additionally Installed:
.Net framework 4.8 sdk
.Net framework 4.8 targeting pack
My Project NAME = CppWinFormsApp1
Changes in MyForms.cpp------->
#include "MyForm.h"
------------------------------------------------->>>using namespace CppWinFormsApp1;
using namespace System;
using namespace System::Windows::Forms;
[STAThreadAttribute]
void main(array^ args) {
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
------------------------------------------->>>CppWinFormsApp1::MyForm form;
Application::Run(% form);
}
Changes in MyForms.h-------->>>
-------------------->>>namespace CppWinFormsApp1 {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
///
/// Summary for MyForm
///
public ref class MyForm : public System::Windows::Forms::Form
{
public:
MyForm(void)
...... Remains Same ...
Hello, has this error been fixed now?
Hi, for me has just worked. I had to correct verson VS from 2019 to 2022, that's all. Thank You very much
what a beautiful bird singing in the background at 1.53 man ^_^
thanks, you really help me :)
Excellent
Ah yes, the sudden urge to make a GUI app at Sherlock Holmes' location
The Game is on!
😂😂😂
@@wearesciber 😂
I installed cppwinform and followed all your instructions but When I am searching in Vishal studio. I couldn't able to find it. "No matches found" appears. So plz help me so that I also can continue my gui. 🙏
@@sourabhsingh7279 perhaps you didn't install the workloads needed to make these kind of apps. watch this video: ua-cam.com/video/HcxlYkU8aY0/v-deo.html
thx
When I try to open the Header File I get the error “The designed could not be shown for this file because none of these classes within it can be designed. The designer inspected the following classes in the file: MyForm -- The base class ‘System.Windows.Forms.Form’ could not be loaded. Ensure the assembly has been referenced and that all projects have been built”. Any help is appreciated!
try reloading the project by right clicking on the project in solution explorer->unload project and then right click on the project name and click reload. i don't know the issue but this worked for me everytime.
@@wearesciber getting same issue but unresolved from above method
can you do this is vs code?
Hey , how do you do OOp with GUI , how do I create classes or add header files
I found it quite annoying that every single tutorial video stops before they actually show you how to do anything. It would be nice if they actually shown people how to modify the winforms, but it seems that these people might not actually know how to because they never show it. It would be nice to see exactly how to work with winforms, rather than a hundred videos showing how to install it and create a new project. Most programs are not complete until you actually write some code. which these people seem to forget. Heck, a simple button to pop up a "hello world" would help a lot.
@@mechinizer6911 Hi, I do have a lot of videos on this subject. In this video I only showed an easy way to make projects.
My visual studio designer giving error even though following all the steps
It tell that move your class code to first class in the file
are you using visual studio 2022?
@@wearesciber yes i am using 2022 version
me too,did you solve it? i need help
@@fatmaelnoby7687 i am sorry for it i wasn't able to solve that
It don't come
Bro c++ වලත් frameworks තියෙනවද?
Ofcourse!
not working there is something missed
can you mention more details about the problem, perhaps send some screenshots to t.me/wearesciber_chat
not working
i have got 143 installed , will this work with that?
Yes
but its giving me an error
@@wearesciber
it says in the dialog box that there were build errors , would you like to continue and run the last successful build , i select yes ,then after that another dialog box with error cant find the path specified
@@wearesciber
Tell me the error
(The first error - in the bottom vs under error list)
i installed the 142 and netframework now its working thanks
@@wearesciber
its still not working
what's the issue, could you give some details.
how about 2010?
Didnt test but 2010 has a tempate built in so no need to install external templates.
Not working
hi can you describe your issue in detail?
this shit not working
whats the issue