Advertisement
thenuke321

Untitled

Jul 21st, 2015
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. #pragma once
  2.  
  3. namespace TestAP {
  4. using namespace std;
  5. using namespace System;
  6. using namespace System::ComponentModel;
  7. using namespace System::Collections;
  8. using namespace System::Windows::Forms;
  9. using namespace System::Data;
  10. using namespace System::Drawing;
  11.  
  12. /// <summary>
  13. /// Summary for mainGUI
  14. /// </summary>
  15. public ref class mainGUI : public System::Windows::Forms::Form
  16. {
  17. private: Form^ mf;
  18. public:
  19. mainGUI(void)
  20. {
  21. InitializeComponent();
  22. this->mf = mf;
  23. //
  24. //TODO: Add the constructor code here
  25. //
  26. }
  27.  
  28. protected:
  29. /// <summary>
  30. /// Clean up any resources being used.
  31. /// </summary>
  32. ~mainGUI()
  33. {
  34. if (components)
  35. {
  36. delete components;
  37. }
  38. }
  39. private: System::Windows::Forms::Button^ goButton;
  40. private: System::Windows::Forms::TextBox^ theTextBox;
  41. protected:
  42.  
  43.  
  44. protected:
  45.  
  46. private:
  47. /// <summary>
  48. /// Required designer variable.
  49. /// </summary>
  50. System::ComponentModel::Container ^components;
  51.  
  52. #pragma region Windows Form Designer generated code
  53. /// <summary>
  54. /// Required method for Designer support - do not modify
  55. /// the contents of this method with the code editor.
  56. /// </summary>
  57. void InitializeComponent(void)
  58. {
  59. this->goButton = (gcnew System::Windows::Forms::Button());
  60. this->theTextBox = (gcnew System::Windows::Forms::TextBox());
  61. this->SuspendLayout();
  62. //
  63. // goButton
  64. //
  65. this->goButton->Location = System::Drawing::Point(137, 63);
  66. this->goButton->Name = L"goButton";
  67. this->goButton->Size = System::Drawing::Size(75, 23);
  68. this->goButton->TabIndex = 0;
  69. this->goButton->Text = L"Go";
  70. this->goButton->UseVisualStyleBackColor = true;
  71. this->goButton->Click += gcnew System::EventHandler(this, &mainGUI::goButton_Click);
  72. //
  73. // theTextBox
  74. //
  75. this->theTextBox->Location = System::Drawing::Point(12, 12);
  76. this->theTextBox->Name = L"theTextBox";
  77. this->theTextBox->Size = System::Drawing::Size(335, 20);
  78. this->theTextBox->TabIndex = 1;
  79. this->theTextBox->TextChanged += gcnew System::EventHandler(this, &mainGUI::theTextBox_TextChanged);
  80. //
  81. // mainGUI
  82. //
  83. this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
  84. this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  85. this->ClientSize = System::Drawing::Size(359, 212);
  86. this->Controls->Add(this->theTextBox);
  87. this->Controls->Add(this->goButton);
  88. this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::Fixed3D;
  89. this->MaximizeBox = false;
  90. this->MinimizeBox = false;
  91. this->Name = L"mainGUI";
  92. this->Text = L"mainGUI";
  93. this->ResumeLayout(false);
  94. this->PerformLayout();
  95.  
  96. }
  97. #pragma endregion
  98. private: System::Void goButton_Click(System::Object^ sender, System::EventArgs^ e)
  99. {
  100. int i(0);
  101. while(true)
  102. {
  103. i++;
  104. theTextBox->Text = Convert::ToString(i);
  105. mf->Refresh();
  106. }
  107. }
  108. private: System::Void theTextBox_TextChanged(System::Object^ sender, System::EventArgs^ e)
  109. {
  110.  
  111. }
  112.  
  113. };
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement