<?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[Countdown&#x2F;Timer]]></title><description><![CDATA[<p>Hallo,<br />
Ich habe ein Problem mit meinem Countdown. Ich sitzte jetzt schon echt lange an dem kleinen code und weiss nicht mehr weiter. Ich habe versucht bei google eine Antwort zu finden aber ich finde einfach nichts. Vl suche ich falsch.<br />
Kommen wir zum code:</p>
<pre><code>#include &lt;DateUtils.hpp&gt;
#include &lt;Dialogs.hpp&gt;

TTime t1;
TTime t2;
TTime t3;
TTime t4;

void __fastcall TForm1::Button1Click(TObject *Sender)
{
	Label13-&gt;Visible = True;
	if (Timer1-&gt;Enabled)
		{
			Timer1-&gt;Enabled = False;
		}
	else
		{
			t1 = EncodeTime(0,1,20,0);
			Timer1-&gt;Enabled = True;
		}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
	t1 = IncSecond(t1, -1);

	Label13-&gt;Caption = TimeToStr(t1);
	if (SecondOf(t1) == 0)
		 {
		 Timer1-&gt;Enabled = False;
		 }
}
</code></pre>
<p>Ich arbeite mit Embarcadero RAD Studio 2010 und habe eine VCL-Formularanwendung erstellt. Der Timer geht von 00:01:20 runter und bleibt bei 00:01:00 stehen. Ich weiß nicht wo mein fehler ist. Könnt mir jemand helfen?</p>
<p>MFG Sadece</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/297756/countdown-timer</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 07:29:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/297756.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 05 Jan 2012 23:16:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Countdown&#x2F;Timer on Thu, 05 Jan 2012 23:16:15 GMT]]></title><description><![CDATA[<p>Hallo,<br />
Ich habe ein Problem mit meinem Countdown. Ich sitzte jetzt schon echt lange an dem kleinen code und weiss nicht mehr weiter. Ich habe versucht bei google eine Antwort zu finden aber ich finde einfach nichts. Vl suche ich falsch.<br />
Kommen wir zum code:</p>
<pre><code>#include &lt;DateUtils.hpp&gt;
#include &lt;Dialogs.hpp&gt;

TTime t1;
TTime t2;
TTime t3;
TTime t4;

void __fastcall TForm1::Button1Click(TObject *Sender)
{
	Label13-&gt;Visible = True;
	if (Timer1-&gt;Enabled)
		{
			Timer1-&gt;Enabled = False;
		}
	else
		{
			t1 = EncodeTime(0,1,20,0);
			Timer1-&gt;Enabled = True;
		}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
	t1 = IncSecond(t1, -1);

	Label13-&gt;Caption = TimeToStr(t1);
	if (SecondOf(t1) == 0)
		 {
		 Timer1-&gt;Enabled = False;
		 }
}
</code></pre>
<p>Ich arbeite mit Embarcadero RAD Studio 2010 und habe eine VCL-Formularanwendung erstellt. Der Timer geht von 00:01:20 runter und bleibt bei 00:01:00 stehen. Ich weiß nicht wo mein fehler ist. Könnt mir jemand helfen?</p>
<p>MFG Sadece</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2164349</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2164349</guid><dc:creator><![CDATA[Sadece]]></dc:creator><pubDate>Thu, 05 Jan 2012 23:16:15 GMT</pubDate></item><item><title><![CDATA[Reply to Countdown&#x2F;Timer on Thu, 05 Jan 2012 23:44:16 GMT]]></title><description><![CDATA[<p>Der Fehler heißt VCL.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2164355</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2164355</guid><dc:creator><![CDATA[314159265358979]]></dc:creator><pubDate>Thu, 05 Jan 2012 23:44:16 GMT</pubDate></item><item><title><![CDATA[Reply to Countdown&#x2F;Timer on Thu, 05 Jan 2012 23:48:14 GMT]]></title><description><![CDATA[<p>Was ist den an VCL falsch? Ich verstehe dich nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2164356</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2164356</guid><dc:creator><![CDATA[Sadece]]></dc:creator><pubDate>Thu, 05 Jan 2012 23:48:14 GMT</pubDate></item><item><title><![CDATA[Reply to Countdown&#x2F;Timer on Thu, 05 Jan 2012 23:57:42 GMT]]></title><description><![CDATA[<p>Sadece schrieb:</p>
<blockquote>
<pre><code>if (SecondOf(t1) == 0)
		 {
		 Timer1-&gt;Enabled = False;
		 }
</code></pre>
</blockquote>
<p>Ich hab noch nie mit VCL gearbeitet, aber SecondOf(t1) wird wohl den Sekundenanteil von t1 liefern, sodass es auch dann 0 ist, wenn der Timer auf 1:00 Minuten steht, sodass der Timer deaktiviert wird.</p>
<p>Edit: BTW gibts ein VCL-Unterforum.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2164357</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2164357</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Thu, 05 Jan 2012 23:57:42 GMT</pubDate></item><item><title><![CDATA[Reply to Countdown&#x2F;Timer on Fri, 06 Jan 2012 09:11:43 GMT]]></title><description><![CDATA[<p>314159265358979 schrieb:</p>
<blockquote>
<p>Der Fehler heißt VCL.</p>
</blockquote>
<p>Langsam nervt´s... hast du da irgendwelche Erfahrungen mit der VCL, die dich zu dieser Aussage qualifizieren? Oder ist das, wie in letzter Zeit häufiger zu lesen, arrogantes Herabblicken auf Anfänger, die keine Probleme posten, die deinem Level entsprechen? Vielleicht einfach mal nix schreiben, wenn man nix Konstruktives beizutragen hat.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2164392</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2164392</guid><dc:creator><![CDATA[DocShoe]]></dc:creator><pubDate>Fri, 06 Jan 2012 09:11:43 GMT</pubDate></item></channel></rss>