Essays.club - Получите бесплатные рефераты, курсовые работы и научные статьи
Поиск

Розроблення найпростішого додатку типу Windows Forms на мові C++ в MS Visual Studio

Автор:   •  Март 16, 2023  •  Лабораторная работа  •  1,306 Слов (6 Страниц)  •  137 Просмотры

Страница 1 из 6

Лабораторна робота No1

Розроблення найпростішого додатку типу Windows Forms на мові C++ в MS Visual Studio

Виконав студент

3 курсу

Групи Ік-12

Ясько Дмитро

1) Виконати завдання, що описано у лабораторній роботі.

.h

#pragma once

// Ясько дмитро Андрійович, Ік-12, лабораторна робота No1

namespace Heron {

    using namespace System;

    public ref class HeronForm : public System::Windows::Forms::Form

    {

    public:

        HeronForm(void)

        {

            InitializeComponent();

        }

    protected:

        ~HeronForm()

        {

            if (components)

            {

                delete components;

            }

        }

    private:

        System::Windows::Forms::Label^ sideALabel;

        System::Windows::Forms::Label^ sideBLabel;

        System::Windows::Forms::Label^ sideCLabel;

        System::Windows::Forms::TextBox^ sideATextBox;

        System::Windows::Forms::TextBox^ sideBTextBox;

        System::Windows::Forms::TextBox^ sideCTextBox;

        System::Windows::Forms::Button^ calculateButton;

        System::Windows::Forms::Label^ resultLabel;

    private: System::Windows::Forms::Label^ label1;

    private: System::Windows::Forms::Label^ label2;

    private: System::Windows::Forms::Label^ label3;

    private: System::Windows::Forms::Label^ label4;

    private: System::Windows::Forms::Button^ button1;

    private: System::Windows::Forms::TextBox^ textBox1;

    private: System::Windows::Forms::TextBox^ textBox2;

    private: System::Windows::Forms::TextBox^ textBox3;

        System::ComponentModel::Container^ components;

#pragma region Windows Form Designer generated code

        void InitializeComponent(void)

        {

            this->sideALabel = (gcnew System::Windows::Forms::Label());

            this->sideBLabel = (gcnew System::Windows::Forms::Label());

            this->sideCLabel = (gcnew System::Windows::Forms::Label());

            this->sideATextBox = (gcnew System::Windows::Forms::TextBox());

            this->sideBTextBox = (gcnew System::Windows::Forms::TextBox());

            this->sideCTextBox = (gcnew System::Windows::Forms::TextBox());

            this->calculateButton = (gcnew System::Windows::Forms::Button());

            this->resultLabel = (gcnew System::Windows::Forms::Label());

            this->SuspendLayout();

            this->sideALabel->AutoSize = true;

            this->sideALabel->Location = System::Drawing::Point(13, 13);

            this->sideALabel->Name = L"sideALabel";

            this->sideALabel->Size = System::Drawing::Size(39, 13);

            this->sideALabel->TabIndex =

.cpp

#include "Heron.h"

#include "stdafx.h"

#include "Heron.h"

using namespace System;

using namespace System::Windows::Forms;

[STAThread]

void main(array<String^>^ args)

{

    Application::EnableVisualStyles();

    Application::SetCompatibleTextRenderingDefault(false);

    Heron::HeronForm form;

    Application::Run(% form);

}

double HeronFormula(double a, double b, double c)

{

    double s = (a + b + c) / 2;

    return sqrt(s * (s - a) * (s - b) * (s - c));

...

Скачать:   txt (5.9 Kb)   pdf (1.3 Mb)   docx (1.4 Mb)  
Продолжить читать еще 5 страниц(ы) »
Доступно только на Essays.club