<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Button1_Click beim Drücken der Taste Enter]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>hab folgenden Code:</p>
<pre><code class="language-cpp">#pragma once

namespace Adressliste_7b2 {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// &lt;summary&gt;
	/// 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.
	/// &lt;/summary&gt;
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Konstruktorcode hier hinzufügen.
			//
		}

	protected:
		/// &lt;summary&gt;
		/// Verwendete Ressourcen bereinigen.
		/// &lt;/summary&gt;
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::TextBox^  pass;
	private: System::Windows::Forms::Button^  button1;
	protected: 

	protected: 

	private:
		/// &lt;summary&gt;
		/// Erforderliche Designervariable.
		/// &lt;/summary&gt;
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// &lt;summary&gt;
		/// Erforderliche Methode für die Designerunterstützung.
		/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
		/// &lt;/summary&gt;
		void InitializeComponent(void)
		{
			this-&gt;label1 = (gcnew System::Windows::Forms::Label());
			this-&gt;pass = (gcnew System::Windows::Forms::TextBox());
			this-&gt;button1 = (gcnew System::Windows::Forms::Button());
			this-&gt;SuspendLayout();
			// 
			// label1
			// 
			this-&gt;label1-&gt;Anchor = System::Windows::Forms::AnchorStyles::None;
			this-&gt;label1-&gt;Font = (gcnew System::Drawing::Font(L&quot;Microsoft Sans Serif&quot;, 12));
			this-&gt;label1-&gt;Location = System::Drawing::Point(12, 9);
			this-&gt;label1-&gt;Name = L&quot;label1&quot;;
			this-&gt;label1-&gt;Size = System::Drawing::Size(775, 49);
			this-&gt;label1-&gt;TabIndex = 0;
			this-&gt;label1-&gt;Text = L&quot;Du musst das Passwort eingeben, um dich einzuloggen. Es ist dasselbe wie das der &quot; 
				L&quot;Seite \&quot;Schüler-Lounge\&quot;. Passwort:&quot;;
			// 
			// pass
			// 
			this-&gt;pass-&gt;Cursor = System::Windows::Forms::Cursors::Hand;
			this-&gt;pass-&gt;Location = System::Drawing::Point(87, 29);
			this-&gt;pass-&gt;Name = L&quot;pass&quot;;
			this-&gt;pass-&gt;ShortcutsEnabled = false;
			this-&gt;pass-&gt;Size = System::Drawing::Size(92, 20);
			this-&gt;pass-&gt;TabIndex = 1;
			this-&gt;pass-&gt;UseSystemPasswordChar = true;
			// 
			// button1
			// 
			this-&gt;button1-&gt;Location = System::Drawing::Point(185, 29);
			this-&gt;button1-&gt;Name = L&quot;button1&quot;;
			this-&gt;button1-&gt;Size = System::Drawing::Size(75, 20);
			this-&gt;button1-&gt;TabIndex = 2;
			this-&gt;button1-&gt;Text = L&quot;Los!&quot;;
			this-&gt;button1-&gt;UseVisualStyleBackColor = true;
			this-&gt;button1-&gt;Click += gcnew System::EventHandler(this, &amp;Form1::button1_Click);
			// 
			// Form1
			// 
			this-&gt;AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this-&gt;AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this-&gt;ClientSize = System::Drawing::Size(784, 564);
			this-&gt;Controls-&gt;Add(this-&gt;button1);
			this-&gt;Controls-&gt;Add(this-&gt;pass);
			this-&gt;Controls-&gt;Add(this-&gt;label1);
			this-&gt;Name = L&quot;Form1&quot;;
			this-&gt;Text = L&quot;Adressliste 7b2&quot;;
			this-&gt;Load += gcnew System::EventHandler(this, &amp;Form1::Form1_Load);
			this-&gt;ResumeLayout(false);
			this-&gt;PerformLayout();

		}
#pragma endregion
	private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
			 }
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
				 Convert::ToString(pass-&gt;Text);
				 if (pass-&gt;Text == (&quot;blabla&quot;) )
			 {
				 label1-&gt;Text = &quot;Erfolgreich eingeloggt.&quot;;
				 pass-&gt;Hide();
				 button1-&gt;Hide();
			 }

			 else
			 {
				 label1-&gt;Text = &quot;Falsches Passwort!&quot;;
			 }
			 }
	};
}
</code></pre>
<p>Wie kriege ich es hin, dass das Eingabefeld &quot;pass&quot; auf Autofokus gesetzt wird und, dass ich, wenn ich ENTER drücke mich einloggen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/218476/button1_click-beim-drücken-der-taste-enter</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 03:18:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/218476.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 21 Jul 2008 13:11:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Button1_Click beim Drücken der Taste Enter on Mon, 21 Jul 2008 13:11:31 GMT]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>hab folgenden Code:</p>
<pre><code class="language-cpp">#pragma once

namespace Adressliste_7b2 {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// &lt;summary&gt;
	/// 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.
	/// &lt;/summary&gt;
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Konstruktorcode hier hinzufügen.
			//
		}

	protected:
		/// &lt;summary&gt;
		/// Verwendete Ressourcen bereinigen.
		/// &lt;/summary&gt;
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::TextBox^  pass;
	private: System::Windows::Forms::Button^  button1;
	protected: 

	protected: 

	private:
		/// &lt;summary&gt;
		/// Erforderliche Designervariable.
		/// &lt;/summary&gt;
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// &lt;summary&gt;
		/// Erforderliche Methode für die Designerunterstützung.
		/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
		/// &lt;/summary&gt;
		void InitializeComponent(void)
		{
			this-&gt;label1 = (gcnew System::Windows::Forms::Label());
			this-&gt;pass = (gcnew System::Windows::Forms::TextBox());
			this-&gt;button1 = (gcnew System::Windows::Forms::Button());
			this-&gt;SuspendLayout();
			// 
			// label1
			// 
			this-&gt;label1-&gt;Anchor = System::Windows::Forms::AnchorStyles::None;
			this-&gt;label1-&gt;Font = (gcnew System::Drawing::Font(L&quot;Microsoft Sans Serif&quot;, 12));
			this-&gt;label1-&gt;Location = System::Drawing::Point(12, 9);
			this-&gt;label1-&gt;Name = L&quot;label1&quot;;
			this-&gt;label1-&gt;Size = System::Drawing::Size(775, 49);
			this-&gt;label1-&gt;TabIndex = 0;
			this-&gt;label1-&gt;Text = L&quot;Du musst das Passwort eingeben, um dich einzuloggen. Es ist dasselbe wie das der &quot; 
				L&quot;Seite \&quot;Schüler-Lounge\&quot;. Passwort:&quot;;
			// 
			// pass
			// 
			this-&gt;pass-&gt;Cursor = System::Windows::Forms::Cursors::Hand;
			this-&gt;pass-&gt;Location = System::Drawing::Point(87, 29);
			this-&gt;pass-&gt;Name = L&quot;pass&quot;;
			this-&gt;pass-&gt;ShortcutsEnabled = false;
			this-&gt;pass-&gt;Size = System::Drawing::Size(92, 20);
			this-&gt;pass-&gt;TabIndex = 1;
			this-&gt;pass-&gt;UseSystemPasswordChar = true;
			// 
			// button1
			// 
			this-&gt;button1-&gt;Location = System::Drawing::Point(185, 29);
			this-&gt;button1-&gt;Name = L&quot;button1&quot;;
			this-&gt;button1-&gt;Size = System::Drawing::Size(75, 20);
			this-&gt;button1-&gt;TabIndex = 2;
			this-&gt;button1-&gt;Text = L&quot;Los!&quot;;
			this-&gt;button1-&gt;UseVisualStyleBackColor = true;
			this-&gt;button1-&gt;Click += gcnew System::EventHandler(this, &amp;Form1::button1_Click);
			// 
			// Form1
			// 
			this-&gt;AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this-&gt;AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this-&gt;ClientSize = System::Drawing::Size(784, 564);
			this-&gt;Controls-&gt;Add(this-&gt;button1);
			this-&gt;Controls-&gt;Add(this-&gt;pass);
			this-&gt;Controls-&gt;Add(this-&gt;label1);
			this-&gt;Name = L&quot;Form1&quot;;
			this-&gt;Text = L&quot;Adressliste 7b2&quot;;
			this-&gt;Load += gcnew System::EventHandler(this, &amp;Form1::Form1_Load);
			this-&gt;ResumeLayout(false);
			this-&gt;PerformLayout();

		}
#pragma endregion
	private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
			 }
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
				 Convert::ToString(pass-&gt;Text);
				 if (pass-&gt;Text == (&quot;blabla&quot;) )
			 {
				 label1-&gt;Text = &quot;Erfolgreich eingeloggt.&quot;;
				 pass-&gt;Hide();
				 button1-&gt;Hide();
			 }

			 else
			 {
				 label1-&gt;Text = &quot;Falsches Passwort!&quot;;
			 }
			 }
	};
}
</code></pre>
<p>Wie kriege ich es hin, dass das Eingabefeld &quot;pass&quot; auf Autofokus gesetzt wird und, dass ich, wenn ich ENTER drücke mich einloggen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1550927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1550927</guid><dc:creator><![CDATA[Hunterson]]></dc:creator><pubDate>Mon, 21 Jul 2008 13:11:31 GMT</pubDate></item><item><title><![CDATA[Reply to Button1_Click beim Drücken der Taste Enter on Mon, 21 Jul 2008 18:04:54 GMT]]></title><description><![CDATA[<p>Ich hab's. War gerade vor meiner Nase.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1551136</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1551136</guid><dc:creator><![CDATA[Hunterson]]></dc:creator><pubDate>Mon, 21 Jul 2008 18:04:54 GMT</pubDate></item><item><title><![CDATA[Reply to Button1_Click beim Drücken der Taste Enter on Tue, 22 Jul 2008 13:14:04 GMT]]></title><description><![CDATA[<p>Na dann ist ja gut!</p>
<p>Du warst übrigens im falschen Forum. Die Frage hätte ins C++/CLI-Forum gehört. Nur so für's nächste Mal... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Und wenn man die Lösung selbst gefunden hat, ist es immer nett, diese hier auch zu posten (für andere, die über die Suche hier landen).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1551684</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1551684</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Tue, 22 Jul 2008 13:14:04 GMT</pubDate></item></channel></rss>