Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- namespace TestAP {
- using namespace std;
- 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>
- /// Summary for mainGUI
- /// </summary>
- public ref class mainGUI : public System::Windows::Forms::Form
- {
- private: Form^ mf;
- public:
- mainGUI(void)
- {
- InitializeComponent();
- this->mf = mf;
- //
- //TODO: Add the constructor code here
- //
- }
- protected:
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- ~mainGUI()
- {
- if (components)
- {
- delete components;
- }
- }
- private: System::Windows::Forms::Button^ goButton;
- private: System::Windows::Forms::TextBox^ theTextBox;
- protected:
- protected:
- private:
- /// <summary>
- /// Required designer variable.
- /// </summary>
- System::ComponentModel::Container ^components;
- #pragma region Windows Form Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- void InitializeComponent(void)
- {
- this->goButton = (gcnew System::Windows::Forms::Button());
- this->theTextBox = (gcnew System::Windows::Forms::TextBox());
- this->SuspendLayout();
- //
- // goButton
- //
- this->goButton->Location = System::Drawing::Point(137, 63);
- this->goButton->Name = L"goButton";
- this->goButton->Size = System::Drawing::Size(75, 23);
- this->goButton->TabIndex = 0;
- this->goButton->Text = L"Go";
- this->goButton->UseVisualStyleBackColor = true;
- this->goButton->Click += gcnew System::EventHandler(this, &mainGUI::goButton_Click);
- //
- // theTextBox
- //
- this->theTextBox->Location = System::Drawing::Point(12, 12);
- this->theTextBox->Name = L"theTextBox";
- this->theTextBox->Size = System::Drawing::Size(335, 20);
- this->theTextBox->TabIndex = 1;
- this->theTextBox->TextChanged += gcnew System::EventHandler(this, &mainGUI::theTextBox_TextChanged);
- //
- // mainGUI
- //
- this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
- this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
- this->ClientSize = System::Drawing::Size(359, 212);
- this->Controls->Add(this->theTextBox);
- this->Controls->Add(this->goButton);
- this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::Fixed3D;
- this->MaximizeBox = false;
- this->MinimizeBox = false;
- this->Name = L"mainGUI";
- this->Text = L"mainGUI";
- this->ResumeLayout(false);
- this->PerformLayout();
- }
- #pragma endregion
- private: System::Void goButton_Click(System::Object^ sender, System::EventArgs^ e)
- {
- int i(0);
- while(true)
- {
- i++;
- theTextBox->Text = Convert::ToString(i);
- mf->Refresh();
- }
- }
- private: System::Void theTextBox_TextChanged(System::Object^ sender, System::EventArgs^ e)
- {
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement