011
22.04.2006, 22:02 Uhr
jeller
|
Danke für den tipp mit Microsoft Visual C++ 2005 ich habe jetzt ein fenster erstellt aber weiß nicht wo ich die funktion der knöpfe ein fügen muss .
hier der jetztie code:
C++: |
#pragma once
namespace erstellsourcecode {
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 /// /// WARNING: If you change the name of this class, you will need to change the /// 'Resource File Name' property for the managed resource compiler tool /// associated with all .resx files this class depends on. Otherwise, /// the designers will not be able to interact properly with localized /// resources associated with this form. /// </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::Button^ button1; private: System::Windows::Forms::Button^ button2; private: System::Windows::Forms::Button^ button3; private: System::Windows::Forms::Button^ button4; private: System::Windows::Forms::PictureBox^ pictureBox1; private: System::Windows::Forms::RichTextBox^ richTextBox1; private: System::Windows::Forms::RichTextBox^ richTextBox2;
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->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->pictureBox1 = (gcnew System::Windows::Forms::PictureBox()); this->richTextBox1 = (gcnew System::Windows::Forms::RichTextBox()); this->richTextBox2 = (gcnew System::Windows::Forms::RichTextBox()); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->BeginInit(); this->SuspendLayout(); // // button1 // this->button1->Location = System::Drawing::Point(24, 38); this->button1->Name = L"button1"; this->button1->Size = System::Drawing::Size(147, 23); this->button1->TabIndex = 0; this->button1->Text = L"HalloWelt1.5"; this->button1->UseVisualStyleBackColor = true; this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click); // // button2 // this->button2->Location = System::Drawing::Point(24, 67); this->button2->Name = L"button2"; this->button2->Size = System::Drawing::Size(147, 23); this->button2->TabIndex = 1; this->button2->Text = L"Shutdown1.0"; this->button2->UseVisualStyleBackColor = true; // // button3 // this->button3->Location = System::Drawing::Point(24, 96); this->button3->Name = L"button3"; this->button3->Size = System::Drawing::Size(147, 23); this->button3->TabIndex = 2; this->button3->Text = L"If-Block1.0"; this->button3->UseVisualStyleBackColor = true; // // button4 // this->button4->Location = System::Drawing::Point(24, 125); this->button4->Name = L"button4"; this->button4->Size = System::Drawing::Size(147, 23); this->button4->TabIndex = 3; this->button4->Text = L"fopen1.0"; this->button4->UseVisualStyleBackColor = true; // // pictureBox1 // this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox1.Image"))); this->pictureBox1->Location = System::Drawing::Point(329, 142); this->pictureBox1->Name = L"pictureBox1"; this->pictureBox1->Size = System::Drawing::Size(114, 116); this->pictureBox1->TabIndex = 4; this->pictureBox1->TabStop = false; // // richTextBox1 // this->richTextBox1->Location = System::Drawing::Point(208, 28); this->richTextBox1->Name = L"richTextBox1"; this->richTextBox1->Size = System::Drawing::Size(214, 85); this->richTextBox1->TabIndex = 5; this->richTextBox1->Text = L"Hier können sie alle meine source codes meiner seite erstellen"; // // richTextBox2 // this->richTextBox2->Font = (gcnew System::Drawing::Font(L"Franklin Gothic Medium", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->richTextBox2->Location = System::Drawing::Point(24, 177); this->richTextBox2->Name = L"richTextBox2"; this->richTextBox2->Size = System::Drawing::Size(254, 77); this->richTextBox2->TabIndex = 6; this->richTextBox2->Text = L"Name : AllsourceCodes 2.0 German Version \nAuthor : jeller\nDate : Sa 22 " L"Apr 21:49:50\n"; this->richTextBox2->TextChanged += gcnew System::EventHandler(this, &Form1::richTextBox2_TextChanged); // // Form1 // this->AutoScaleDimensions = System::Drawing::SizeF(10, 15); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->BackColor = System::Drawing::SystemColors::Control; this->ClientSize = System::Drawing::Size(455, 266); this->Controls->Add(this->richTextBox2); this->Controls->Add(this->richTextBox1); this->Controls->Add(this->pictureBox1); this->Controls->Add(this->button4); this->Controls->Add(this->button3); this->Controls->Add(this->button2); this->Controls->Add(this->button1); this->Font = (gcnew System::Drawing::Font(L"Lucida Console", 11.25F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)), System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->ForeColor = System::Drawing::SystemColors::InfoText; this->Margin = System::Windows::Forms::Padding(5, 3, 5, 3); this->Name = L"Form1"; this->Text = L"All SourceCodes 2.0(GER)"; (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit(); this->ResumeLayout(false);
} #pragma endregion private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void richTextBox2_TextChanged(System::Object^ sender, System::EventArgs^ e) { } }; }
|
mfg jeller |