Newbee-Frage zur Timer-Programmierung
-
Hallöchen, allerseits!
Ich bin neu auf dem Gebiet, was C++ angeht (bin vorher eher auf dem Gebiet von C, C# und Delphi zu Hause gewesen).
Deshalb eine Frage, die ihr mir bitte nicht an den Kopf haut von wegen, "schon 100 mal dagewesen". Ich schwöre, ich habe auch zuerst in den FAQ geblättert, doch leider nichts zufriedenstellendes gefunden.Nun mein konkretes Anliegen: Ich bin momentan dabei, mit Visual C++ 2005 Express Edition eine nette Windows-Anwendung zu kreieren.
Dazu habe ich neben diversen Buttons und Textfeldern auch zwei unabhängige Timer eingesetzt: Timer 1 mit einer Intervallzeit von 500 ms und Timer 2 mit einer Intervallzeit von 1000 ms.
Nun möchte ich folgendes: Drücke ich auf Button 1, dann soll Text A im Textfeld 1 angezeigt werden, und zwar blinkend je eine halbe Sekunde weiß und eine halbe Sekunde Text.
Drücke ich auf Button 2, dann soll Text B im Textfeld 1 angezeigt werden, und zwar blinkend je eine Sekunde weiß und eine Sekunde Text.Jetzt die Preisfrage: Wie sieht der notwendige Quellcode dazu aus?
Ich bedanke mich schon mal äußerst herzlich im Voraus für die liebe Hilfe.
Gruß, Martin
-
was ist denn der Preis für die Preisfrage?
-
1 Mio € (rein virtuell versteht sich)
Ich bin nämlich gerade dabei, mein "Wer-wird-Millionär-Programm" von C# sowie von JavaScript in C++ zu konvertieren.
Und solch ein blinkender Text unter Zuhilfenahme eines Timers wäre schon nicht schlecht (später sollen die Timer nicht nur Text blinken lassen, sondern auch z.B. Zeitschranken ermöglichen, so dass man für die einzelnen Fragen nur endlich Zeit zur Verfügung hat.
MfG Martin
-
Da du mit Winforms und nicht mir der MFC arbeitest, schieb ich mal.
-
Dieser Thread wurde von Moderator/in estartu aus dem Forum MFC (Visual C++) in das Forum C++/CLI mit .NET verschoben.
Im Zweifelsfall bitte auch folgende Hinweise beachten:
C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?Dieses Posting wurde automatisch erzeugt.
-
Niemand eine Idee?
-
Ist doch nicht so schwierig, oder?
Pseudocode:
Button1-Klick:
timer1.Enable = true; text1.ForeColor = test1.BackColor;
timer1-Tick:
if (text1.ForeColor == test1.BackColor) text1.ForeColor = Color.WindowText; else text1.ForeColor = text1.BackColor;
Und das gleiche für button2 und tick2
-
mit test1 meinst du doch text1, oder?
Wenn ich das auf meine Textfelder- und Button-Namen übertrage, dann bekomme ich beim Compilieren auf einmal satte 9 Fehlermeldungen.
Der 1-ste Fehler lautet gleich mal Links von ".Enable" muss sich eine Klasse/Struktur/Union befinden.
Das gleiche steht dann bei Links von ".ForeColor" , Links von ".BackColor", usw.
Euer ratloser Martin
-
Das ganze war ja auch nur pseudocode!
Richtiger wäre vermutlich:
timer1->Enable = true; text1->ForeColor = text1->BackColor; if (text1->ForeColor == test1->BackColor) text1->ForeColor = Color::WindowText; else text1->ForeColor = text1->BackColor;
aber auch noch ungetestet...
-
Vielen Dank für die Mühe!
Werde ich heute Abend gleich nach der Arbeit mal testen.
Gruß, Martin
-
Hah, jetzt hat sich die Fehleranzahl gedrittelt.
1-ter Fehler: error C2039: 'Enable': Ist kein Element von 'System::Windows::Forms::Timer'
2-ter Fehler: error C2039: 'WindowText': Ist kein Element von 'System::Drawing::Color'
3-ter Fehler: error C3767: "System::Windows::Forms::Form::WindowText::get": Auf mögliche Funktion(en) kann nicht zugegriffen werden.Gruß, Martin
-
Aha,
ist das ne neue Preisfrage oder zeigst uns auch den Quellcoe der zu den Fehlermeldungen gehört ?
-
OK, kann ich machen (wenn ich heute Abend von der Arbeit zurück bin).
Ich dachte, die Fehler-Nummern sind allgemeiner Natur (die Bezeichnung error Cxxxx) und hängen nicht vom Quelltext ab.
Ich werde nachher mal das bisherige Programm veröffentlichen (bis jetzt ist es nur ein Skelett ohne Inhalt -> diesen muss ich erst mühsam von C# in C++ umwandeln)
Leider ist die Hife-Funktion in der Express-Version nicht so gut. Meine Vollversion von Visual Studio 2005 ist nämlich abgelaufen (habe nur eine Version für 180 Tage) und für eine Neuaktivierung müsste ich mindestens mein Windows neu installieren.
Gruß, Martin
-
Schade, dass man die Datei nicht direkt hochladen kann.
Nun denn, hier ist die komplette Form1.h DateiGruß, Martin
#pragma once namespace Wer_wird_Millionaer { 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> /// Zusammenfassung für Form1 /// /// Warnung: Wenn Sie den Namen dieser Klasse ändern, müssen Sie auch /// die Ressourcendateiname-Eigenschaft für das Tool zur Kompilierung verwalteter Ressourcen ändern, /// das allen RESX-Dateien zugewiesen ist, von denen diese Klasse abhängt. /// Anderenfalls können die Designer nicht korrekt mit den lokalisierten Ressourcen /// arbeiten, die diesem Formular zugewiesen sind. /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: Konstruktorcode hier hinzufügen. // } protected: /// <summary> /// Verwendete Ressourcen bereinigen. /// </summary> ~Form1() { if (components) { delete components; } } private: System::Windows::Forms::Button^ Button_Start; protected: private: System::Windows::Forms::Button^ Button_Weiter; private: System::Windows::Forms::TextBox^ Text_Antwort_D; private: System::Windows::Forms::TextBox^ Text_Antwort_B; private: System::Windows::Forms::TextBox^ Text_Antwort_A; private: System::Windows::Forms::TextBox^ Text_Antwort_C; private: System::Windows::Forms::Button^ Button_Antwort_A; private: System::Windows::Forms::Button^ Button_Antwort_C; private: System::Windows::Forms::Button^ Button_Antwort_B; private: System::Windows::Forms::Button^ Button_Antwort_D; private: System::Windows::Forms::TextBox^ Text_Fragestellung; private: System::Windows::Forms::Button^ Button_Joker_Fifty_Fifty; private: System::Windows::Forms::Button^ Button_Joker_Publikum; private: System::Windows::Forms::Button^ Button_Joker_Telefon; private: System::Windows::Forms::TextBox^ Text_Joker_Fifty_Fifty; private: System::Windows::Forms::TextBox^ Text_Joker_Publikum; private: System::Windows::Forms::TextBox^ Text_Joker_Telefon; private: System::Windows::Forms::TextBox^ Text_Loesungswort; private: System::Windows::Forms::Timer^ timer1; private: System::Windows::Forms::Timer^ timer2; private: System::ComponentModel::IContainer^ components; protected: private: /// <summary> /// Erforderliche Designervariable. /// </summary> #pragma region Windows Form Designer generated code /// <summary> /// Erforderliche Methode für die Designerunterstützung. /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. /// </summary> void InitializeComponent(void) { this->components = (gcnew System::ComponentModel::Container()); this->Button_Start = (gcnew System::Windows::Forms::Button()); this->Button_Weiter = (gcnew System::Windows::Forms::Button()); this->Text_Antwort_D = (gcnew System::Windows::Forms::TextBox()); this->Text_Antwort_B = (gcnew System::Windows::Forms::TextBox()); this->Text_Antwort_A = (gcnew System::Windows::Forms::TextBox()); this->Text_Antwort_C = (gcnew System::Windows::Forms::TextBox()); this->Button_Antwort_A = (gcnew System::Windows::Forms::Button()); this->Button_Antwort_C = (gcnew System::Windows::Forms::Button()); this->Button_Antwort_B = (gcnew System::Windows::Forms::Button()); this->Button_Antwort_D = (gcnew System::Windows::Forms::Button()); this->Text_Fragestellung = (gcnew System::Windows::Forms::TextBox()); this->Button_Joker_Fifty_Fifty = (gcnew System::Windows::Forms::Button()); this->Button_Joker_Publikum = (gcnew System::Windows::Forms::Button()); this->Button_Joker_Telefon = (gcnew System::Windows::Forms::Button()); this->Text_Joker_Fifty_Fifty = (gcnew System::Windows::Forms::TextBox()); this->Text_Joker_Publikum = (gcnew System::Windows::Forms::TextBox()); this->Text_Joker_Telefon = (gcnew System::Windows::Forms::TextBox()); this->Text_Loesungswort = (gcnew System::Windows::Forms::TextBox()); this->timer1 = (gcnew System::Windows::Forms::Timer(this->components)); this->timer2 = (gcnew System::Windows::Forms::Timer(this->components)); this->SuspendLayout(); // // Button_Start // this->Button_Start->BackColor = System::Drawing::Color::Red; this->Button_Start->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Button_Start->Location = System::Drawing::Point(290, 550); this->Button_Start->Name = L"Button_Start"; this->Button_Start->Size = System::Drawing::Size(100, 50); this->Button_Start->TabIndex = 0; this->Button_Start->Text = L"Start"; this->Button_Start->UseVisualStyleBackColor = false; this->Button_Start->Click += gcnew System::EventHandler(this, &Form1::Button_Start_Click); // // Button_Weiter // this->Button_Weiter->BackColor = System::Drawing::Color::Red; this->Button_Weiter->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Button_Weiter->Location = System::Drawing::Point(410, 550); this->Button_Weiter->Name = L"Button_Weiter"; this->Button_Weiter->Size = System::Drawing::Size(100, 50); this->Button_Weiter->TabIndex = 1; this->Button_Weiter->Text = L"Weiter"; this->Button_Weiter->UseVisualStyleBackColor = false; this->Button_Weiter->Click += gcnew System::EventHandler(this, &Form1::Button_Weiter_Click); // // Text_Antwort_D // this->Text_Antwort_D->BackColor = System::Drawing::SystemColors::GradientInactiveCaption; this->Text_Antwort_D->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Text_Antwort_D->Location = System::Drawing::Point(410, 450); this->Text_Antwort_D->Multiline = true; this->Text_Antwort_D->Name = L"Text_Antwort_D"; this->Text_Antwort_D->ReadOnly = true; this->Text_Antwort_D->Size = System::Drawing::Size(250, 75); this->Text_Antwort_D->TabIndex = 2; this->Text_Antwort_D->TextChanged += gcnew System::EventHandler(this, &Form1::Text_Antwort_D_TextChanged); // // Text_Antwort_B // this->Text_Antwort_B->BackColor = System::Drawing::SystemColors::GradientInactiveCaption; this->Text_Antwort_B->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Text_Antwort_B->Location = System::Drawing::Point(140, 450); this->Text_Antwort_B->Multiline = true; this->Text_Antwort_B->Name = L"Text_Antwort_B"; this->Text_Antwort_B->ReadOnly = true; this->Text_Antwort_B->Size = System::Drawing::Size(250, 75); this->Text_Antwort_B->TabIndex = 3; this->Text_Antwort_B->TextChanged += gcnew System::EventHandler(this, &Form1::Text_Antwort_B_TextChanged); // // Text_Antwort_A // this->Text_Antwort_A->BackColor = System::Drawing::SystemColors::GradientInactiveCaption; this->Text_Antwort_A->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Text_Antwort_A->Location = System::Drawing::Point(140, 350); this->Text_Antwort_A->Multiline = true; this->Text_Antwort_A->Name = L"Text_Antwort_A"; this->Text_Antwort_A->ReadOnly = true; this->Text_Antwort_A->Size = System::Drawing::Size(250, 75); this->Text_Antwort_A->TabIndex = 4; this->Text_Antwort_A->TextChanged += gcnew System::EventHandler(this, &Form1::Text_Antwort_A_TextChanged); // // Text_Antwort_C // this->Text_Antwort_C->BackColor = System::Drawing::SystemColors::GradientInactiveCaption; this->Text_Antwort_C->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Text_Antwort_C->Location = System::Drawing::Point(410, 350); this->Text_Antwort_C->Multiline = true; this->Text_Antwort_C->Name = L"Text_Antwort_C"; this->Text_Antwort_C->ReadOnly = true; this->Text_Antwort_C->Size = System::Drawing::Size(250, 75); this->Text_Antwort_C->TabIndex = 5; this->Text_Antwort_C->TextChanged += gcnew System::EventHandler(this, &Form1::Text_Antwort_C_TextChanged); // // Button_Antwort_A // this->Button_Antwort_A->BackColor = System::Drawing::Color::Green; this->Button_Antwort_A->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Button_Antwort_A->Location = System::Drawing::Point(20, 350); this->Button_Antwort_A->Name = L"Button_Antwort_A"; this->Button_Antwort_A->Size = System::Drawing::Size(100, 75); this->Button_Antwort_A->TabIndex = 6; this->Button_Antwort_A->Text = L"Antwort A"; this->Button_Antwort_A->UseVisualStyleBackColor = false; this->Button_Antwort_A->Click += gcnew System::EventHandler(this, &Form1::Button_Antwort_A_Click); // // Button_Antwort_C // this->Button_Antwort_C->BackColor = System::Drawing::Color::Green; this->Button_Antwort_C->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Button_Antwort_C->Location = System::Drawing::Point(20, 450); this->Button_Antwort_C->Name = L"Button_Antwort_C"; this->Button_Antwort_C->Size = System::Drawing::Size(100, 75); this->Button_Antwort_C->TabIndex = 7; this->Button_Antwort_C->Text = L"Antwort C"; this->Button_Antwort_C->UseVisualStyleBackColor = false; this->Button_Antwort_C->Click += gcnew System::EventHandler(this, &Form1::Button_Antwort_C_Click); // // Button_Antwort_B // this->Button_Antwort_B->BackColor = System::Drawing::Color::Green; this->Button_Antwort_B->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Button_Antwort_B->Location = System::Drawing::Point(680, 350); this->Button_Antwort_B->Name = L"Button_Antwort_B"; this->Button_Antwort_B->Size = System::Drawing::Size(100, 75); this->Button_Antwort_B->TabIndex = 8; this->Button_Antwort_B->Text = L"Antwort B"; this->Button_Antwort_B->UseVisualStyleBackColor = false; this->Button_Antwort_B->Click += gcnew System::EventHandler(this, &Form1::Button_Antwort_B_Click); // // Button_Antwort_D // this->Button_Antwort_D->BackColor = System::Drawing::Color::Green; this->Button_Antwort_D->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Button_Antwort_D->Location = System::Drawing::Point(680, 450); this->Button_Antwort_D->Name = L"Button_Antwort_D"; this->Button_Antwort_D->Size = System::Drawing::Size(100, 75); this->Button_Antwort_D->TabIndex = 9; this->Button_Antwort_D->Text = L"Antwort D"; this->Button_Antwort_D->UseVisualStyleBackColor = false; this->Button_Antwort_D->Click += gcnew System::EventHandler(this, &Form1::Button_Antwort_D_Click); // // Text_Fragestellung // this->Text_Fragestellung->BackColor = System::Drawing::Color::NavajoWhite; this->Text_Fragestellung->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Text_Fragestellung->Location = System::Drawing::Point(280, 30); this->Text_Fragestellung->Multiline = true; this->Text_Fragestellung->Name = L"Text_Fragestellung"; this->Text_Fragestellung->ReadOnly = true; this->Text_Fragestellung->Size = System::Drawing::Size(500, 260); this->Text_Fragestellung->TabIndex = 10; this->Text_Fragestellung->TextChanged += gcnew System::EventHandler(this, &Form1::Text_Fragestellung_TextChanged); // // Button_Joker_Fifty_Fifty // this->Button_Joker_Fifty_Fifty->BackColor = System::Drawing::Color::Salmon; this->Button_Joker_Fifty_Fifty->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Button_Joker_Fifty_Fifty->Location = System::Drawing::Point(20, 30); this->Button_Joker_Fifty_Fifty->Name = L"Button_Joker_Fifty_Fifty"; this->Button_Joker_Fifty_Fifty->Size = System::Drawing::Size(100, 50); this->Button_Joker_Fifty_Fifty->TabIndex = 11; this->Button_Joker_Fifty_Fifty->Text = L"50 : 50"; this->Button_Joker_Fifty_Fifty->UseVisualStyleBackColor = false; this->Button_Joker_Fifty_Fifty->Click += gcnew System::EventHandler(this, &Form1::Button_Joker_Fifty_Fifty_Click); // // Button_Joker_Publikum // this->Button_Joker_Publikum->BackColor = System::Drawing::Color::Salmon; this->Button_Joker_Publikum->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Button_Joker_Publikum->Location = System::Drawing::Point(20, 101); this->Button_Joker_Publikum->Name = L"Button_Joker_Publikum"; this->Button_Joker_Publikum->Size = System::Drawing::Size(100, 50); this->Button_Joker_Publikum->TabIndex = 12; this->Button_Joker_Publikum->Text = L"Publikum"; this->Button_Joker_Publikum->UseVisualStyleBackColor = false; this->Button_Joker_Publikum->Click += gcnew System::EventHandler(this, &Form1::Button_Joker_Publikum_Click); // // Button_Joker_Telefon // this->Button_Joker_Telefon->BackColor = System::Drawing::Color::Salmon; this->Button_Joker_Telefon->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Button_Joker_Telefon->Location = System::Drawing::Point(20, 170); this->Button_Joker_Telefon->Name = L"Button_Joker_Telefon"; this->Button_Joker_Telefon->Size = System::Drawing::Size(100, 50); this->Button_Joker_Telefon->TabIndex = 13; this->Button_Joker_Telefon->Text = L"Telefon"; this->Button_Joker_Telefon->UseVisualStyleBackColor = false; this->Button_Joker_Telefon->Click += gcnew System::EventHandler(this, &Form1::Button_Joker_Telefon_Click); // // Text_Joker_Fifty_Fifty // this->Text_Joker_Fifty_Fifty->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(192))); this->Text_Joker_Fifty_Fifty->Font = (gcnew System::Drawing::Font(L"Arial", 12, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)), System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Text_Joker_Fifty_Fifty->Location = System::Drawing::Point(150, 30); this->Text_Joker_Fifty_Fifty->Multiline = true; this->Text_Joker_Fifty_Fifty->Name = L"Text_Joker_Fifty_Fifty"; this->Text_Joker_Fifty_Fifty->ReadOnly = true; this->Text_Joker_Fifty_Fifty->Size = System::Drawing::Size(100, 50); this->Text_Joker_Fifty_Fifty->TabIndex = 14; this->Text_Joker_Fifty_Fifty->Text = L"\r\nVerfügbar"; this->Text_Joker_Fifty_Fifty->TextChanged += gcnew System::EventHandler(this, &Form1::Text_Joker_Fifty_Fifty_TextChanged); // // Text_Joker_Publikum // this->Text_Joker_Publikum->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(192))); this->Text_Joker_Publikum->Font = (gcnew System::Drawing::Font(L"Arial", 12, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)), System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Text_Joker_Publikum->Location = System::Drawing::Point(150, 100); this->Text_Joker_Publikum->Multiline = true; this->Text_Joker_Publikum->Name = L"Text_Joker_Publikum"; this->Text_Joker_Publikum->ReadOnly = true; this->Text_Joker_Publikum->Size = System::Drawing::Size(100, 50); this->Text_Joker_Publikum->TabIndex = 15; this->Text_Joker_Publikum->Text = L"\r\nVerfügbar"; this->Text_Joker_Publikum->TextChanged += gcnew System::EventHandler(this, &Form1::Text_Joker_Publikum_TextChanged); // // Text_Joker_Telefon // this->Text_Joker_Telefon->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(192))); this->Text_Joker_Telefon->Font = (gcnew System::Drawing::Font(L"Arial", 12, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)), System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Text_Joker_Telefon->Location = System::Drawing::Point(150, 170); this->Text_Joker_Telefon->Multiline = true; this->Text_Joker_Telefon->Name = L"Text_Joker_Telefon"; this->Text_Joker_Telefon->ReadOnly = true; this->Text_Joker_Telefon->Size = System::Drawing::Size(100, 50); this->Text_Joker_Telefon->TabIndex = 16; this->Text_Joker_Telefon->Text = L"\r\nVerfügbar"; this->Text_Joker_Telefon->TextChanged += gcnew System::EventHandler(this, &Form1::Text_Joker_Telefon_TextChanged); // // Text_Loesungswort // this->Text_Loesungswort->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(192))); this->Text_Loesungswort->Font = (gcnew System::Drawing::Font(L"Arial", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->Text_Loesungswort->Location = System::Drawing::Point(20, 240); this->Text_Loesungswort->Multiline = true; this->Text_Loesungswort->Name = L"Text_Loesungswort"; this->Text_Loesungswort->ReadOnly = true; this->Text_Loesungswort->Size = System::Drawing::Size(230, 50); this->Text_Loesungswort->TabIndex = 17; this->Text_Loesungswort->TextChanged += gcnew System::EventHandler(this, &Form1::Text_Loesungswort_TextChanged); // // timer1 // this->timer1->Interval = 500; this->timer1->Tick += gcnew System::EventHandler(this, &Form1::timer1_Tick); // // timer2 // this->timer2->Interval = 1000; this->timer2->Tick += gcnew System::EventHandler(this, &Form1::timer2_Tick); // // Form1 // this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->BackColor = System::Drawing::Color::PaleTurquoise; this->ClientSize = System::Drawing::Size(792, 616); this->Controls->Add(this->Text_Loesungswort); this->Controls->Add(this->Text_Joker_Telefon); this->Controls->Add(this->Text_Joker_Publikum); this->Controls->Add(this->Text_Joker_Fifty_Fifty); this->Controls->Add(this->Button_Joker_Telefon); this->Controls->Add(this->Button_Joker_Publikum); this->Controls->Add(this->Button_Joker_Fifty_Fifty); this->Controls->Add(this->Text_Fragestellung); this->Controls->Add(this->Button_Antwort_D); this->Controls->Add(this->Button_Antwort_B); this->Controls->Add(this->Button_Antwort_C); this->Controls->Add(this->Button_Antwort_A); this->Controls->Add(this->Text_Antwort_C); this->Controls->Add(this->Text_Antwort_A); this->Controls->Add(this->Text_Antwort_B); this->Controls->Add(this->Text_Antwort_D); this->Controls->Add(this->Button_Weiter); this->Controls->Add(this->Button_Start); this->Name = L"Form1"; this->Text = L"Herzlich willkommen zu \"Wer wird Millionär\"!"; this->ResumeLayout(false); this->PerformLayout(); } #pragma endregion private: System::Void Button_Joker_Fifty_Fifty_Click(System::Object^ sender, System::EventArgs^ e) { timer1->Enable = true; Text_Joker_Fifty_Fifty->ForeColor = Text_Joker_Fifty_Fifty->BackColor; } private: System::Void Button_Joker_Publikum_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Button_Joker_Telefon_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Button_Antwort_A_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Button_Antwort_B_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Button_Antwort_C_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Button_Antwort_D_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Button_Start_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Button_Weiter_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Text_Fragestellung_TextChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Text_Loesungswort_TextChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Text_Antwort_A_TextChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Text_Antwort_C_TextChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Text_Antwort_B_TextChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Text_Antwort_D_TextChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) { if (Text_Joker_Fifty_Fifty->ForeColor == Text_Joker_Fifty_Fifty->BackColor) Text_Joker_Fifty_Fifty->ForeColor = Color::WindowText; else Text_Joker_Fifty_Fifty->ForeColor = Text_Joker_Fifty_Fifty->BackColor; } private: System::Void timer2_Tick(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Text_Joker_Fifty_Fifty_TextChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Text_Joker_Publikum_TextChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void Text_Joker_Telefon_TextChanged(System::Object^ sender, System::EventArgs^ e) { } }; }