-
November 20th, 2014, 08:57 PM
#1
Help with a really simple program
This is what i need(I made a short video):
http://screencast.com/t/UsPjDW4Y
Code:
#pragma once
namespace FirewareEvolution {
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 Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Label^ label1;
protected:
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Button^ button2;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::TextBox^ textBox2;
private: System::Windows::Forms::TextBox^ textBox3;
private: System::Windows::Forms::TextBox^ textBox4;
private: System::Windows::Forms::TextBox^ textBox5;
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)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
this->label1 = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->button1 = (gcnew System::Windows::Forms::Button());
this->button2 = (gcnew System::Windows::Forms::Button());
this->label3 = (gcnew System::Windows::Forms::Label());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->textBox3 = (gcnew System::Windows::Forms::TextBox());
this->textBox4 = (gcnew System::Windows::Forms::TextBox());
this->textBox5 = (gcnew System::Windows::Forms::TextBox());
this->SuspendLayout();
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(691, 89);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(53, 13);
this->label1->TabIndex = 0;
this->label1->Text = L"Decryptor";
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(335, 16);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(87, 13);
this->label2->TabIndex = 1;
this->label2->Text = L"Translation Code";
//
// button1
//
this->button1->Location = System::Drawing::Point(167, 84);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(75, 23);
this->button1->TabIndex = 2;
this->button1->Text = L"Encrypt";
this->button1->UseVisualStyleBackColor = true;
//
// button2
//
this->button2->Location = System::Drawing::Point(511, 84);
this->button2->Name = L"button2";
this->button2->Size = System::Drawing::Size(75, 23);
this->button2->TabIndex = 3;
this->button2->Text = L"Decrypt";
this->button2->UseVisualStyleBackColor = true;
//
// label3
//
this->label3->AutoSize = true;
this->label3->Location = System::Drawing::Point(12, 89);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(52, 13);
this->label3->TabIndex = 4;
this->label3->Text = L"Encryptor";
//
// textBox1
//
this->textBox1->Location = System::Drawing::Point(12, 241);
this->textBox1->MaxLength = 400;
this->textBox1->Multiline = true;
this->textBox1->Name = L"textBox1";
this->textBox1->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
this->textBox1->Size = System::Drawing::Size(266, 130);
this->textBox1->TabIndex = 5;
//
// textBox2
//
this->textBox2->Location = System::Drawing::Point(478, 241);
this->textBox2->MaxLength = 400;
this->textBox2->Multiline = true;
this->textBox2->Name = L"textBox2";
this->textBox2->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
this->textBox2->Size = System::Drawing::Size(266, 130);
this->textBox2->TabIndex = 6;
//
// textBox3
//
this->textBox3->Location = System::Drawing::Point(278, 32);
this->textBox3->MaxLength = 25;
this->textBox3->Name = L"textBox3";
this->textBox3->Size = System::Drawing::Size(200, 20);
this->textBox3->TabIndex = 7;
this->textBox3->UseSystemPasswordChar = true;
//
// textBox4
//
this->textBox4->Location = System::Drawing::Point(12, 113);
this->textBox4->MaxLength = 400;
this->textBox4->Multiline = true;
this->textBox4->Name = L"textBox4";
this->textBox4->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
this->textBox4->Size = System::Drawing::Size(266, 122);
this->textBox4->TabIndex = 8;
//
// textBox5
//
this->textBox5->Location = System::Drawing::Point(478, 113);
this->textBox5->MaxLength = 400;
this->textBox5->Multiline = true;
this->textBox5->Name = L"textBox5";
this->textBox5->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
this->textBox5->Size = System::Drawing::Size(266, 122);
this->textBox5->TabIndex = 9;
this->textBox5->TextChanged += gcnew System::EventHandler(this, &Form1::textBox5_TextChanged);
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(756, 383);
this->Controls->Add(this->textBox5);
this->Controls->Add(this->textBox4);
this->Controls->Add(this->textBox3);
this->Controls->Add(this->textBox2);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->label3);
this->Controls->Add(this->button2);
this->Controls->Add(this->button1);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon")));
this->MaximizeBox = false;
this->Name = L"Form1";
this->Text = L"Fireware";
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox5_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
};
}
-
November 21st, 2014, 09:29 AM
#2
Re: Help with a really simple program
This is managed c++. You would get a better response if you posted here http://forums.codeguru.com/forumdisp...ed-C-and-C-CLI
[moderator would you move this post please]
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|