0% found this document useful (0 votes)
37 views3 pages

DDD.docx

This document defines a Form1 class that inherits from the System.Windows.Forms.Form class. The Form1 class contains private fields for four buttons and initializes their properties. It overrides the Form's InitializeComponent method to initialize the form layout and add the buttons as controls. It also defines a private event handler for the form load event.

Uploaded by

kolihaaa
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views3 pages

DDD.docx

This document defines a Form1 class that inherits from the System.Windows.Forms.Form class. The Form1 class contains private fields for four buttons and initializes their properties. It overrides the Form's InitializeComponent method to initialize the form layout and add the buttons as controls. It also defines a private event handler for the form load event.

Uploaded by

kolihaaa
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

#pragma once namespace ejemplo1 { using using using using using using namespace namespace namespace namespace namespace

namespace System; System::ComponentModel; System::Collections; System::Windows::Forms; System::Data; System::Drawing;

/// <summary> /// Resumen de Form1 /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: agregar cdigo de constructor aqu // } protected: /// <summary> /// Limpiar los recursos que se estn utilizando. /// </summary> ~Form1() { if (components) { delete components; } } private: System::Windows::Forms::Button^ button1; protected: private: System::Windows::Forms::Button^ button2; private: System::Windows::Forms::Button^ button3; private: System::Windows::Forms::Button^ button4; private: /// <summary> /// Variable del diseador requerida. /// </summary> System::ComponentModel::Container ^components; #pragma region Windows Form Designer generated code /// <summary> /// Mtodo necesario para admitir el Diseador. No se puede modificar /// el contenido del mtodo con el editor de cdigo. /// </summary> void InitializeComponent(void) { this->button1 = (gcnew System::Windows::Forms::Button()); this->button2 = (gcnew System::Windows::Forms::Button()); this->button3 = (gcnew System::Windows::Forms::Button());

this->button4 = (gcnew System::Windows::Forms::Button()); this->SuspendLayout(); // // button1 // this->button1->Font = (gcnew System::Drawing::Font(L"Lucida Handwriting", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->button1->ForeColor = System::Drawing::SystemColors::ControlText; this->button1->Location = System::Drawing::Point(209, 197); this->button1->Name = L"button1"; this->button1->Size = System::Drawing::Size(50, 42); this->button1->TabIndex = 0; this->button1->Text = L"9"; this->button1->UseVisualStyleBackColor = true; // // button2 // this->button2->Font = (gcnew System::Drawing::Font(L"Lucida Handwriting", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->button2->ForeColor = System::Drawing::SystemColors::ControlText; this->button2->Location = System::Drawing::Point(143, 197); this->button2->Name = L"button2"; this->button2->Size = System::Drawing::Size(52, 42); this->button2->TabIndex = 1; this->button2->Text = L"8"; this->button2->UseVisualStyleBackColor = true; // // button3 // this->button3->Font = (gcnew System::Drawing::Font(L"Lucida Handwriting", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->button3->ForeColor = System::Drawing::SystemColors::ControlText; this->button3->Location = System::Drawing::Point(76, 197); this->button3->Name = L"button3"; this->button3->Size = System::Drawing::Size(50, 42); this->button3->TabIndex = 2; this->button3->Text = L"7"; this->button3->UseVisualStyleBackColor = true; // // button4 // this->button4->Font = (gcnew System::Drawing::Font(L"Lucida Handwriting", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->button4->ForeColor = System::Drawing::SystemColors::ControlText; this->button4->Location = System::Drawing::Point(22, 197); this->button4->Name = L"button4";

this->button4->Size = System::Drawing::Size(48, 42); this->button4->TabIndex = 3; this->button4->Text = L"6"; this->button4->UseVisualStyleBackColor = true; // // Form1 // this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->BackColor = System::Drawing::SystemColors::HotTrack; this->ClientSize = System::Drawing::Size(292, 266); this->Controls->Add(this->button4); this->Controls->Add(this->button3); this->Controls->Add(this->button2); this->Controls->Add(this->button1); this->ForeColor = System::Drawing::SystemColors::GradientInactiveCaption; this->Name = L"Form1"; this->Text = L"Calculadora"; this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load); this->ResumeLayout(false); } #pragma endregion private: System::Void Form1_Load(System::Object^ e) { } }; }

sender, System::EventArgs^

You might also like