michci Opublikowano 19 Sierpnia 2013 Udostępnij Opublikowano 19 Sierpnia 2013 Mam problem kiedy wpiszę kod w program. Bez kodu czyli same okienko aplikacji działa wszystko ok. Ale gdy już napiszę jakiś kod to wyskakuje mi właśnie oto taki błąd i nie wiem co zrobić. Przeinstalowałem parę razy framework 4.0 ale nic nadal to samo Logi 1>------ Build started: Project: formtest, Configuration: Debug Win32 ------ 1> formtest.cpp 1>c:\users\komp\documents\visual studio 2010\projects\formtest\formtest\Form1.h(111): error C2039: 'start' : is not a member of 'System::Windows::Forms::Timer' 1> c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\system.windows.forms.dll : see declaration of 'System::Windows::Forms::Timer' 1>c:\users\komp\documents\visual studio 2010\projects\formtest\formtest\Form1.h(114): error C2039: 'text' : is not a member of 'System::Windows::Forms::TextBox' 1> c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\system.windows.forms.dll : see declaration of 'System::Windows::Forms::TextBox' 1>c:\users\komp\documents\visual studio 2010\projects\formtest\formtest\Form1.h(115): error C2039: 'text' : is not a member of 'System::Windows::Forms::TextBox' 1> c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\system.windows.forms.dll : see declaration of 'System::Windows::Forms::TextBox' 1>c:\users\komp\documents\visual studio 2010\projects\formtest\formtest\Form1.h(120): error C2039: 'stop' : is not a member of 'System::Windows::Forms::Timer' 1> c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\system.windows.forms.dll : see declaration of 'System::Windows::Forms::Timer' ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Kod #pragma once namespace formtest { 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::Button^ button1; private: System::Windows::Forms::Timer^ timer1; private: System::Windows::Forms::Button^ button2; private: System::Windows::Forms::TextBox^ textBox1; private: System::ComponentModel::IContainer^ components; protected: private: /// <summary> /// Required designer variable. /// </summary> #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->components = (gcnew System::ComponentModel::Container()); this->button1 = (gcnew System::Windows::Forms::Button()); this->timer1 = (gcnew System::Windows::Forms::Timer(this->components)); this->button2 = (gcnew System::Windows::Forms::Button()); this->textBox1 = (gcnew System::Windows::Forms::TextBox()); this->SuspendLayout(); // // button1 // this->button1->Location = System::Drawing::Point(12, 12); this->button1->Name = L"button1"; this->button1->Size = System::Drawing::Size(75, 23); this->button1->TabIndex = 0; this->button1->Text = L"button1"; this->button1->UseVisualStyleBackColor = true; this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click); // // timer1 // this->timer1->Tick += gcnew System::EventHandler(this, &Form1::timer1_Tick); // // button2 // this->button2->Location = System::Drawing::Point(130, 12); this->button2->Name = L"button2"; this->button2->Size = System::Drawing::Size(75, 23); this->button2->TabIndex = 1; this->button2->Text = L"button2"; this->button2->UseVisualStyleBackColor = true; this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click); // // textBox1 // this->textBox1->Location = System::Drawing::Point(12, 41); this->textBox1->Name = L"textBox1"; this->textBox1->Size = System::Drawing::Size(193, 20); this->textBox1->TabIndex = 2; // // Form1 // this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(217, 72); this->Controls->Add(this->textBox1); this->Controls->Add(this->button2); this->Controls->Add(this->button1); this->Name = L"Form1"; this->Text = L"Form1"; this->ResumeLayout(false); this->PerformLayout(); } #pragma endregion private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { timer1->start(); } private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) { if(textBox1->text == "") { textBox1->text = "none"; } SendKeys::Send(textBox1->Text); } private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) { timer1->stop(); } }; } Odnośnik do komentarza
Antix Opublikowano 20 Sierpnia 2013 Udostępnij Opublikowano 20 Sierpnia 2013 [C++][Problem] Form Application - C++, Asembler, Delphi - MPCforum - Cheaty, Boty, Bugi, Hacki do gier online Odnośnik do komentarza
Rekomendowane odpowiedzi
Zarchiwizowany
Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.