Решил научиться программировать в Win Forms.
Вот ссылка
https://code-live.ru/post/first-windows-form/
Делал всё как надо, получил код ниже, но появилась ошибка LNK1561
ЧТО ДЕЛАТЬ?
Помогите плз.
#pragma once
namespace WinApp {
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>
/// Сводка для MyForm
/// </summary>
public ref class MyForm : public System::Windows::Forms::Form
{
public:
MyForm(void)
{
InitializeComponent();
//
//TODO: добавьте код конструктора
//
}
protected:
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
~MyForm()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Label^ sd;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::TextBox^ source1;
private: System::Windows::Forms::TextBox^ answer1;
protected:
private:
/// <summary>
/// Обязательная переменная конструктора.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
void InitializeComponent(void)
{
this->button1 = (gcnew System::Windows::Forms::Button());
this->sd = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->label3 = (gcnew System::Windows::Forms::Label());
this->source1 = (gcnew System::Windows::Forms::TextBox());
this->answer1 = (gcnew System::Windows::Forms::TextBox());
this->SuspendLayout();
//
// button1
//
this->button1->Location = System::Drawing::Point(95, 168);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(100, 36);
this->button1->TabIndex = 0;
this->button1->Text = L"Вычислить факториал";
this->button1->UseVisualStyleBackColor = true;
//
// sd
//
this->sd->AutoSize = true;
this->sd->Location = System::Drawing::Point(53, 26);
this->sd->Name = L"sd";
this->sd->Size = System::Drawing::Size(165, 13);
this->sd->TabIndex = 1;
this->sd->Text = L"Вычисление факториала числа";
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(52, 70);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(42, 13);
this->label2->TabIndex = 2;
this->label2->Text = L"Число:";
this->label2->Click += gcnew System::EventHandler(this, &MyForm::label2_Click);
//
// label3
//
this->label3->AutoSize = true;
this->label3->Location = System::Drawing::Point(54, 126);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(40, 13);
this->label3->TabIndex = 3;
this->label3->Text = L"Ответ:";
//
// source1
//
this->source1->Location = System::Drawing::Point(95, 67);
this->source1->Name = L"source1";
this->source1->Size = System::Drawing::Size(100, 20);
this->source1->TabIndex = 4;
//
// answer1
//
this->answer1->Location = System::Drawing::Point(95, 119);
this->answer1->Name = L"answer1";
this->answer1->Size = System::Drawing::Size(100, 20);
this->answer1->TabIndex = 5;
//
// MyForm
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(284, 238);
this->Controls->Add(this->answer1);
this->Controls->Add(this->source1);
this->Controls->Add(this->label3);
this->Controls->Add(this->label2);
this->Controls->Add(this->sd);
this->Controls->Add(this->button1);
this->MaximizeBox = false;
this->Name = L"MyForm";
this->Text = L"MyForm";
this->Load += gcnew System::EventHandler(this, &MyForm::MyForm_Load);
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void label2_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void MyForm_Load(System::Object^ sender, System::EventArgs^ e) {
}
};
}