<?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[eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1)]]></title><description><![CDATA[<p>Hallo,</p>
<p>habe folgendes Problem:</p>
<p>Ich möchte von einen Form6 Formular in einen Form1 Formular einen Wert in eine Variable schreiben.</p>
<p>Hier ein Beispiel:</p>
<p>Code für die Unit1 (Form1): Hier ist die Variable float Spannungsfall</p>
<p>-----------------------------------------------------------------------------<br />
#include &lt;vcl.h&gt;<br />
#pragma hdrstop<br />
#include &quot;Unit1.h&quot;<br />
#include &quot;Unit2.h&quot;<br />
#include &quot;Unit3.h&quot;<br />
#include &lt;math.h&gt;<br />
#include &quot;Unit4.h&quot;<br />
#include &quot;Unit5.h&quot;<br />
#include &quot;Unit6.h&quot;<br />
//---------------------------------------------------------------------------</p>
<p>#pragma package(smart_init)<br />
#pragma resource &quot;*.dfm&quot;<br />
TForm1 *Form1;<br />
//---------------------------------------------------------------------------</p>
<p>float Spannungsfall=3.0;</p>
<p>//---------------------------------------------------------------------------<br />
__fastcall TForm1::TForm1(TComponent* Owner)<br />
: TForm(Owner)<br />
{</p>
<p>}</p>
<p>...<br />
-----------------------------------------------------------------------------<br />
-----------------------------------------------------------------------------<br />
-----------------------------------------------------------------------------</p>
<p>Code für die Unit6 (Form6): Hier möchte ich über eine ComboBox1 den Text direkt<br />
in die Variable auf der Unit1 Spannungsfall schreiben</p>
<p>//---------------------------------------------------------------------------</p>
<p>#include &lt;vcl.h&gt;<br />
#pragma hdrstop</p>
<p>#include &quot;Unit6.h&quot;<br />
#include &quot;Unit1.h&quot;<br />
//---------------------------------------------------------------------------<br />
#pragma package(smart_init)<br />
#pragma resource &quot;*.dfm&quot;<br />
TForm6 <em>Form6;<br />
//---------------------------------------------------------------------------<br />
__fastcall TForm6::TForm6(TComponent</em> Owner)<br />
: TForm(Owner)<br />
{<br />
}<br />
//---------------------------------------------------------------------------</p>
<p>void __fastcall TForm6::Button1Click(TObject *Sender)<br />
{<br />
ComboBox1-&gt;Text ????????????????????????????????????</p>
<p>Form6-&gt;Visible=false;<br />
}<br />
//---------------------------------------------------------------------------</p>
<p>...</p>
<p>Könnt ihr mir da weiterhelfen?</p>
<p>Gruss</p>
<p>ahl</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/156876/eine-variable-von-der-unit6-in-die-unit1-schreiben-form6-gt-form1</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 04:23:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/156876.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 21 Aug 2006 06:51:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Mon, 21 Aug 2006 06:51:50 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>habe folgendes Problem:</p>
<p>Ich möchte von einen Form6 Formular in einen Form1 Formular einen Wert in eine Variable schreiben.</p>
<p>Hier ein Beispiel:</p>
<p>Code für die Unit1 (Form1): Hier ist die Variable float Spannungsfall</p>
<p>-----------------------------------------------------------------------------<br />
#include &lt;vcl.h&gt;<br />
#pragma hdrstop<br />
#include &quot;Unit1.h&quot;<br />
#include &quot;Unit2.h&quot;<br />
#include &quot;Unit3.h&quot;<br />
#include &lt;math.h&gt;<br />
#include &quot;Unit4.h&quot;<br />
#include &quot;Unit5.h&quot;<br />
#include &quot;Unit6.h&quot;<br />
//---------------------------------------------------------------------------</p>
<p>#pragma package(smart_init)<br />
#pragma resource &quot;*.dfm&quot;<br />
TForm1 *Form1;<br />
//---------------------------------------------------------------------------</p>
<p>float Spannungsfall=3.0;</p>
<p>//---------------------------------------------------------------------------<br />
__fastcall TForm1::TForm1(TComponent* Owner)<br />
: TForm(Owner)<br />
{</p>
<p>}</p>
<p>...<br />
-----------------------------------------------------------------------------<br />
-----------------------------------------------------------------------------<br />
-----------------------------------------------------------------------------</p>
<p>Code für die Unit6 (Form6): Hier möchte ich über eine ComboBox1 den Text direkt<br />
in die Variable auf der Unit1 Spannungsfall schreiben</p>
<p>//---------------------------------------------------------------------------</p>
<p>#include &lt;vcl.h&gt;<br />
#pragma hdrstop</p>
<p>#include &quot;Unit6.h&quot;<br />
#include &quot;Unit1.h&quot;<br />
//---------------------------------------------------------------------------<br />
#pragma package(smart_init)<br />
#pragma resource &quot;*.dfm&quot;<br />
TForm6 <em>Form6;<br />
//---------------------------------------------------------------------------<br />
__fastcall TForm6::TForm6(TComponent</em> Owner)<br />
: TForm(Owner)<br />
{<br />
}<br />
//---------------------------------------------------------------------------</p>
<p>void __fastcall TForm6::Button1Click(TObject *Sender)<br />
{<br />
ComboBox1-&gt;Text ????????????????????????????????????</p>
<p>Form6-&gt;Visible=false;<br />
}<br />
//---------------------------------------------------------------------------</p>
<p>...</p>
<p>Könnt ihr mir da weiterhelfen?</p>
<p>Gruss</p>
<p>ahl</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121222</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121222</guid><dc:creator><![CDATA[ahl]]></dc:creator><pubDate>Mon, 21 Aug 2006 06:51:50 GMT</pubDate></item><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Mon, 21 Aug 2006 07:08:40 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>siehe FAQ, Thread <em>Variablenübergabe an andere Form</em></p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121225</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121225</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 21 Aug 2006 07:08:40 GMT</pubDate></item><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Mon, 21 Aug 2006 07:13:16 GMT]]></title><description><![CDATA[<p>Das kommt in den public deiner Unit1.h<br />
(public: // Anwender-Deklarationen)</p>
<pre><code class="language-cpp">float Spannungsfall;
</code></pre>
<p>Dann setzt du irgendwo deinen Wert in deine Variable (Unit1.cpp):<br />
Hier z.B. im Konstruktor</p>
<pre><code class="language-cpp">__fastcall TForm1::TForm1(TComponent* Owner)
   : TForm(Owner)
{
   Spannungsfall=3.0;
}
</code></pre>
<p>Dann kannst du in deiner Form6 so darauf zugreifen:</p>
<pre><code class="language-cpp">ComboBox1-&gt;Text = Form1-&gt;Spannungsfall;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1121226</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121226</guid><dc:creator><![CDATA[bcbler]]></dc:creator><pubDate>Mon, 21 Aug 2006 07:13:16 GMT</pubDate></item><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Mon, 21 Aug 2006 07:15:20 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Code-Tags benutzen<br />
muss die Variable spannungsfall direkt, oder erst beim zeigen von Form1 zugewiesen werden???<br />
in Form6:</p>
<pre><code class="language-cpp">Form1-&gt;Temp-&gt;Text = ComboBox1-&gt;Text;
</code></pre>
<p>in Form1(bei onEnter oder onShow):</p>
<pre><code class="language-cpp">Spannungsfall = Form1-&gt;Temp-&gt;Text.c_str();
</code></pre>
<p>Form1-&gt;Temp bezeichnet ein unsichtbares(visible = false) EditFeld in Form1.</p>
<p>corvin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121227</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121227</guid><dc:creator><![CDATA[corvin1397]]></dc:creator><pubDate>Mon, 21 Aug 2006 07:15:20 GMT</pubDate></item><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Mon, 21 Aug 2006 07:17:49 GMT]]></title><description><![CDATA[<p>so gehts' auch:</p>
<pre><code class="language-cpp">#include &lt;vcl.h&gt; 
#pragma hdrstop 

float Spannungsfall=3.0;

#include &quot;Unit1.h&quot; 
#include &quot;Unit2.h&quot; 
#include &quot;Unit3.h&quot; 
#include &lt;math.h&gt; 
#include &quot;Unit4.h&quot; 
#include &quot;Unit5.h&quot; 
#include &quot;Unit6.h&quot; 
//--------------------------------------------------------------------------- 

#pragma package(smart_init) 
#pragma resource &quot;*.dfm&quot; 
TForm1 *Form1; 
//--------------------------------------------------------------------------- 

//--------------------------------------------------------------------------- 
__fastcall TForm1::TForm1(TComponent* Owner) 
: TForm(Owner) 
{ 

} 

... 
----------------------------------------------------------------------------- 
----------------------------------------------------------------------------- 
-----------------------------------------------------------------------------
</code></pre>
<p>corvin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121228</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121228</guid><dc:creator><![CDATA[corvin1397]]></dc:creator><pubDate>Mon, 21 Aug 2006 07:17:49 GMT</pubDate></item><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Mon, 21 Aug 2006 07:27:16 GMT]]></title><description><![CDATA[<blockquote>
<p>so gehts' auch:</p>
</blockquote>
<p>So geht was ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121232</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121232</guid><dc:creator><![CDATA[ludolphi]]></dc:creator><pubDate>Mon, 21 Aug 2006 07:27:16 GMT</pubDate></item><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Mon, 21 Aug 2006 09:47:28 GMT]]></title><description><![CDATA[<p>Hallo corvin1397,</p>
<p>so hatte ich es probiert, aber ohne Erfolg. Ich kann natürlich ein Fehler gemacht haben.</p>
<p>Vielen Dank für vielen Antworten, ich denke ich bekomme es so hin.</p>
<p>Gruss ahl</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121341</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121341</guid><dc:creator><![CDATA[ahl]]></dc:creator><pubDate>Mon, 21 Aug 2006 09:47:28 GMT</pubDate></item><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Mon, 21 Aug 2006 10:06:57 GMT]]></title><description><![CDATA[<p>Der Wert Spannungsfall wird erst verändert, wenn TForm6 aufgerufen wird, das kann aber höchstselten sein oder auch garnicht, je nach Benutzer.</p>
<p>Dem Wert muss als erstes eine Zahl zugewiesen werden, hier 3.0, sonst gibt es in der Berechnung später Probleme, denn so steht dort irgendwas drin oder auch die 0.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121352</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121352</guid><dc:creator><![CDATA[ahl]]></dc:creator><pubDate>Mon, 21 Aug 2006 10:06:57 GMT</pubDate></item><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Mon, 21 Aug 2006 11:47:43 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/13650">@ludolphi</a></p>
<p>ahl schrieb:</p>
<blockquote>
<p>Hallo,</p>
<p>habe folgendes Problem:</p>
<p>Ich möchte von einen Form6 Formular in einen Form1 Formular einen Wert in eine Variable schreiben.</p>
</blockquote>
<p>@ahl</p>
<pre><code class="language-cpp">Form1-&gt;Temp-&gt;Text = ComboBox1-&gt;Text;
</code></pre>
<p>muss bei einem onClick oder OnChange ereigniss stehen</p>
<p>corvin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121442</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121442</guid><dc:creator><![CDATA[corvin1397]]></dc:creator><pubDate>Mon, 21 Aug 2006 11:47:43 GMT</pubDate></item><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Mon, 21 Aug 2006 11:54:54 GMT]]></title><description><![CDATA[<p>corvin1397 schrieb:</p>
<blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/13650">@ludolphi</a></p>
<p>ahl schrieb:</p>
<blockquote>
<p>Hallo,</p>
<p>habe folgendes Problem:</p>
<p>Ich möchte von einen Form6 Formular in einen Form1 Formular einen Wert in eine Variable schreiben.</p>
</blockquote>
<p>@ahl</p>
<pre><code class="language-cpp">Form1-&gt;Temp-&gt;Text = ComboBox1-&gt;Text;
</code></pre>
<p>muss bei einem onClick oder OnChange ereigniss stehen</p>
<p>corvin</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<blockquote>
<p>Dem Wert muss als erstes eine Zahl zugewiesen werden, hier 3.0, sonst gibt es in der Berechnung später Probleme, denn so steht dort irgendwas drin oder auch die 0.</p>
</blockquote>
<p>Ein Startwert gehört in den Konstruktor.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121448</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121448</guid><dc:creator><![CDATA[ludolphi]]></dc:creator><pubDate>Mon, 21 Aug 2006 11:54:54 GMT</pubDate></item><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Mon, 21 Aug 2006 19:08:13 GMT]]></title><description><![CDATA[<p>Habe zum laufen bekommen,</p>
<p>habe die Methode von bcbler benutzt.</p>
<p>Vielen DAnk für die Hilfe</p>
<p>Gruß ahl</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121804</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121804</guid><dc:creator><![CDATA[ahl]]></dc:creator><pubDate>Mon, 21 Aug 2006 19:08:13 GMT</pubDate></item><item><title><![CDATA[Reply to eine Variable von der Unit6 in die Unit1 schreiben (Form6-&amp;gt;Form1) on Tue, 22 Aug 2006 06:09:11 GMT]]></title><description><![CDATA[<p>ahl schrieb:</p>
<blockquote>
<p>Habe zum laufen bekommen,</p>
<p>habe die Methode von bcbler benutzt.</p>
<p>Vielen DAnk für die Hilfe</p>
<p>Gruß ahl</p>
</blockquote>
<p>die ist ja auch richtig!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121920</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121920</guid><dc:creator><![CDATA[ser1al]]></dc:creator><pubDate>Tue, 22 Aug 2006 06:09:11 GMT</pubDate></item></channel></rss>