#pragma once
namespace Vicks {
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>
/// Resumen de MyForm
/// </summary>
public ref class MyForm : public System::Windows::Forms::Form
{
public:
MyForm(void)
{
InitializeComponent();
//
//TODO: agregar código de constructor aquí
//
}
protected:
/// <summary>
/// Limpiar los recursos que se estén utilizando.
/// </summary>
~MyForm()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::TextBox^ textBox2;
protected:
private:
/// <summary>
/// Variable del diseñador requerida.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Método necesario para admitir el Diseñador. No se puede modificar
/// el contenido del método con el editor de código.
/// </summary>
void InitializeComponent(void)
{
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->button1 = (gcnew System::Windows::Forms::Button());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->SuspendLayout();
//
// textBox1
//
this->textBox1->Location = System::Drawing::Point(48, 75);
this->textBox1->Margin = System::Windows::Forms::Padding(4, 3, 4, 3);
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Drawing::Size(88, 20);
this->textBox1->TabIndex = 0;
this->textBox1->TextChanged += gcnew System::EventHandler(this, &MyForm::textBox1_TextChanged);
//
// button1
//
this->button1->BackColor = System::Drawing::Color::Transparent;
this->button1->Location = System::Drawing::Point(112, 170);
this->button1->Margin = System::Windows::Forms::Padding(4, 3, 4, 3);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(118, 62);
this->button1->TabIndex = 1;
this->button1->Text = L"Click!";
this->button1->UseVisualStyleBackColor = false;
this->button1->Click += gcnew System::EventHandler(this, &MyForm::button1_Click);
//
// textBox2
//
this->textBox2->Location = System::Drawing::Point(200, 75);
this->textBox2->Margin = System::Windows::Forms::Padding(4, 3, 4, 3);
this->textBox2->Name = L"textBox2";
this->textBox2->Size = System::Drawing::Size(95, 20);
this->textBox2->TabIndex = 2;
//
// MyForm
//
this->AutoScaleDimensions = System::Drawing::SizeF(7, 14);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackColor = System::Drawing::Color::WhiteSmoke;
this->ClientSize = System::Drawing::Size(332, 281);
this->Controls->Add(this->textBox2);
this->Controls->Add(this->button1);
this->Controls->Add(this->textBox1);
this->Font = (gcnew System::Drawing::Font(L"Georgia", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->Margin = System::Windows::Forms::Padding(4, 3, 4, 3);
this->Name = L"MyForm";
this->Text = L"MyForm";
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void label1_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
/*
textBox1 -> Text = label1 -> Text;
*/
/*
String ^ a;
a=textBox2->Text;
textBox2 -> Text = textBox1 -> Text;
textBox1->Text=a;
*/
textBox1 -> Text += textBox2 -> Text;
textBox2 -> Text = "";
}
};
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.