<?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[Meldungen sofort anzeigen]]></title><description><![CDATA[<p>ich habe ein Programm geschrieben das die Primzahlen ausrechnet.</p>
<p>status und Primtahlen sind trichedits</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
bool fertig;
bool start;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::FormCreate(TObject *Sender)
{
 Primzahlen-&gt;Text = &quot;&quot;;

  Primzahlen-&gt;ReadOnly = true;
   Status-&gt;Text = &quot;&quot;;
  Status-&gt;ReadOnly = true;

 fertig = false;
 start = true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormKeyDown(TObject *Sender, WORD &amp;Key,
      TShiftState Shift)
{
//Notabschalten mit ESC

if (GetAsyncKeyState(0x1B) &lt; 0)
  {
  fertig = true;
  Start-&gt;Caption = &quot;Stopp&quot;;
        start = false;
  }
}
//---------------------------------------------------------------------------

void __fastcall TForm1::StartClick(TObject *Sender)
{
bool pzahl;
Status-&gt;Lines-&gt;Add(&quot;Startbutton geklickt&quot;);
if (start == true)
{
Start-&gt;Caption = &quot;Stopp&quot;;
start = false;

fertig = false;
int Zahl;
Zahl = StrToInt(Startzahl-&gt;Text);

int stoppzahl;
stoppzahl = StrToInt(Stoppzahl-&gt;Text);

Status-&gt;Lines-&gt;Add(&quot;Kurz vor der schleife&quot;);
while (Zahl &lt;= stoppzahl)
{
Status-&gt;Lines-&gt;Add(&quot;Erste Schleife erreich&quot;);

int i = 2;
while (i &lt; Zahl)
{
pzahl = true;

Status-&gt;Lines-&gt;Add(&quot;Zweite Schleife erreich&quot;);

if (Zahl % i == 0)  //Wenn keine Primzahl
{
i = Zahl;
pzahl = false;
}
i++;
}

if (pzahl)
{
Primzahlen-&gt;Lines-&gt;Add(String(Zahl));
Edit1-&gt;Text = String(Zahl);
Sleep(5);
}

Zahl ++;
}
Status-&gt;Lines-&gt;Add(&quot;hinter der schleife&quot;);

}else{
Start-&gt;Caption = &quot;Start&quot;;
start = true;
}

}
//---------------------------------------------------------------------------
</code></pre>
<p>Die Meldungen bei status werden noch eährend des rechnens angezeigt bei Primzahlen und Edit1 aber nicht .</p>
<p>Ich habe keinen Schimmer woran das leigt.</p>
<p>MfG kevka</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/152357/meldungen-sofort-anzeigen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 09 Aug 2026 00:30:57 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/152357.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Jul 2006 15:16:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Meldungen sofort anzeigen on Wed, 05 Jul 2006 15:16:06 GMT]]></title><description><![CDATA[<p>ich habe ein Programm geschrieben das die Primzahlen ausrechnet.</p>
<p>status und Primtahlen sind trichedits</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
bool fertig;
bool start;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::FormCreate(TObject *Sender)
{
 Primzahlen-&gt;Text = &quot;&quot;;

  Primzahlen-&gt;ReadOnly = true;
   Status-&gt;Text = &quot;&quot;;
  Status-&gt;ReadOnly = true;

 fertig = false;
 start = true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormKeyDown(TObject *Sender, WORD &amp;Key,
      TShiftState Shift)
{
//Notabschalten mit ESC

if (GetAsyncKeyState(0x1B) &lt; 0)
  {
  fertig = true;
  Start-&gt;Caption = &quot;Stopp&quot;;
        start = false;
  }
}
//---------------------------------------------------------------------------

void __fastcall TForm1::StartClick(TObject *Sender)
{
bool pzahl;
Status-&gt;Lines-&gt;Add(&quot;Startbutton geklickt&quot;);
if (start == true)
{
Start-&gt;Caption = &quot;Stopp&quot;;
start = false;

fertig = false;
int Zahl;
Zahl = StrToInt(Startzahl-&gt;Text);

int stoppzahl;
stoppzahl = StrToInt(Stoppzahl-&gt;Text);

Status-&gt;Lines-&gt;Add(&quot;Kurz vor der schleife&quot;);
while (Zahl &lt;= stoppzahl)
{
Status-&gt;Lines-&gt;Add(&quot;Erste Schleife erreich&quot;);

int i = 2;
while (i &lt; Zahl)
{
pzahl = true;

Status-&gt;Lines-&gt;Add(&quot;Zweite Schleife erreich&quot;);

if (Zahl % i == 0)  //Wenn keine Primzahl
{
i = Zahl;
pzahl = false;
}
i++;
}

if (pzahl)
{
Primzahlen-&gt;Lines-&gt;Add(String(Zahl));
Edit1-&gt;Text = String(Zahl);
Sleep(5);
}

Zahl ++;
}
Status-&gt;Lines-&gt;Add(&quot;hinter der schleife&quot;);

}else{
Start-&gt;Caption = &quot;Start&quot;;
start = true;
}

}
//---------------------------------------------------------------------------
</code></pre>
<p>Die Meldungen bei status werden noch eährend des rechnens angezeigt bei Primzahlen und Edit1 aber nicht .</p>
<p>Ich habe keinen Schimmer woran das leigt.</p>
<p>MfG kevka</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1091921</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091921</guid><dc:creator><![CDATA[kevka]]></dc:creator><pubDate>Wed, 05 Jul 2006 15:16:06 GMT</pubDate></item><item><title><![CDATA[Reply to Meldungen sofort anzeigen on Wed, 05 Jul 2006 15:17:57 GMT]]></title><description><![CDATA[<p>ProcessMessages();</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1091923</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091923</guid><dc:creator><![CDATA[Rostfrei**]]></dc:creator><pubDate>Wed, 05 Jul 2006 15:17:57 GMT</pubDate></item></channel></rss>