<?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[Hide() Problem]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich hab da mal ein kleines Problem.<br />
Ich hab ein Programm geschrieben was nach einer bestimmten Zeit einen<br />
Mausklick simuliert, und ich hätte das Programm gerne im Hintergrund.<br />
Das Programm lässt sich auch in den Hintergrund verfrachten nur werden dann keine Mausklicks mehr simuliert. BS:Windows XP - Borland C++ 4 Builder<br />
Anbei der Quelltext.<br />
Vielleicht könnt ihr mir ja helfen.</p>
<pre><code class="language-cpp">#include &lt;vcl.h&gt;
#include &lt;windows.h&gt;
#include &lt;time.h&gt;
#pragma hdrstop

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

int Meldung, xPos, yPos, aPos, bPos, c, d;
tagPOINT x, y;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{

}
//---------------------------------------------------------------------------

void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
  Timer1-&gt;Interval = 4000;

  mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
  mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);

}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
        Timer1-&gt;Enabled = false;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button2Click(TObject *Sender)
{

        Timer1-&gt;Enabled = true;

        Hide();

}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button3Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
</code></pre>
<p><strong>Edit:</strong><br />
Bitte die <strong><a href="http://c-plusplus.net/forum/faq.php?mode=bbcode" rel="nofollow">Code-Tags</a></strong> benutzen. Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/84050/hide-problem</link><generator>RSS for Node</generator><lastBuildDate>Thu, 02 Jul 2026 19:00:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/84050.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 26 Aug 2004 13:50:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hide() Problem on Thu, 26 Aug 2004 15:33:56 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich hab da mal ein kleines Problem.<br />
Ich hab ein Programm geschrieben was nach einer bestimmten Zeit einen<br />
Mausklick simuliert, und ich hätte das Programm gerne im Hintergrund.<br />
Das Programm lässt sich auch in den Hintergrund verfrachten nur werden dann keine Mausklicks mehr simuliert. BS:Windows XP - Borland C++ 4 Builder<br />
Anbei der Quelltext.<br />
Vielleicht könnt ihr mir ja helfen.</p>
<pre><code class="language-cpp">#include &lt;vcl.h&gt;
#include &lt;windows.h&gt;
#include &lt;time.h&gt;
#pragma hdrstop

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

int Meldung, xPos, yPos, aPos, bPos, c, d;
tagPOINT x, y;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{

}
//---------------------------------------------------------------------------

void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
  Timer1-&gt;Interval = 4000;

  mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
  mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);

}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
        Timer1-&gt;Enabled = false;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button2Click(TObject *Sender)
{

        Timer1-&gt;Enabled = true;

        Hide();

}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button3Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
</code></pre>
<p><strong>Edit:</strong><br />
Bitte die <strong><a href="http://c-plusplus.net/forum/faq.php?mode=bbcode" rel="nofollow">Code-Tags</a></strong> benutzen. Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/591946</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/591946</guid><dc:creator><![CDATA[userfriendly]]></dc:creator><pubDate>Thu, 26 Aug 2004 15:33:56 GMT</pubDate></item><item><title><![CDATA[Reply to Hide() Problem on Thu, 26 Aug 2004 15:34:40 GMT]]></title><description><![CDATA[<p>Wo willst du denn hinklicken?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/592091</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/592091</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Thu, 26 Aug 2004 15:34:40 GMT</pubDate></item><item><title><![CDATA[Reply to Hide() Problem on Thu, 26 Aug 2004 16:18:53 GMT]]></title><description><![CDATA[<p>Es soll nur ein Klick werden auf dem desktop oder sonst wo, kein bestimmtes Ziel.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/592167</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/592167</guid><dc:creator><![CDATA[userfriendly]]></dc:creator><pubDate>Thu, 26 Aug 2004 16:18:53 GMT</pubDate></item><item><title><![CDATA[Reply to Hide() Problem on Thu, 26 Aug 2004 17:45:59 GMT]]></title><description><![CDATA[<p>Und welchen Sinn soll das haben?<br />
MfG Aoeke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/592293</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/592293</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 26 Aug 2004 17:45:59 GMT</pubDate></item><item><title><![CDATA[Reply to Hide() Problem on Fri, 27 Aug 2004 03:31:27 GMT]]></title><description><![CDATA[<p>na den klick auf einen Banner der ihm angeziegt wird, damit er geld bekommt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/592674</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/592674</guid><dc:creator><![CDATA[maYer]]></dc:creator><pubDate>Fri, 27 Aug 2004 03:31:27 GMT</pubDate></item><item><title><![CDATA[Reply to Hide() Problem on Fri, 27 Aug 2004 06:38:00 GMT]]></title><description><![CDATA[<p>Es soll verhindert werden das der Bildschirmschoner angeht.<br />
Okay ich weiss, Einstellungen-&gt;Ansicht usw, ist auch bloss eine Übung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/592701</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/592701</guid><dc:creator><![CDATA[userfriendly]]></dc:creator><pubDate>Fri, 27 Aug 2004 06:38:00 GMT</pubDate></item></channel></rss>