<?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[OnMouseMove]]></title><description><![CDATA[<p>Hi,<br />
ich möchte dass der Button immer springt , aber wie mache ich das ?</p>
<p>void __fastcall TForm1::Button1MouseMove(TObject *Sender,<br />
TShiftState Shift, int X, int Y)<br />
{<br />
Button1-&gt;Left=2;<br />
Button1-&gt;Top=2;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/75143/onmousemove</link><generator>RSS for Node</generator><lastBuildDate>Sun, 28 Jun 2026 01:28:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/75143.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 27 May 2004 16:29:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to OnMouseMove on Thu, 27 May 2004 16:29:43 GMT]]></title><description><![CDATA[<p>Hi,<br />
ich möchte dass der Button immer springt , aber wie mache ich das ?</p>
<p>void __fastcall TForm1::Button1MouseMove(TObject *Sender,<br />
TShiftState Shift, int X, int Y)<br />
{<br />
Button1-&gt;Left=2;<br />
Button1-&gt;Top=2;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/528491</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/528491</guid><dc:creator><![CDATA[Tomek-gast]]></dc:creator><pubDate>Thu, 27 May 2004 16:29:43 GMT</pubDate></item><item><title><![CDATA[Reply to OnMouseMove on Thu, 27 May 2004 16:41:50 GMT]]></title><description><![CDATA[<p>void __fastcall TForm1::Button1MouseMove(TObject *Sender,<br />
TShiftState Shift, int X, int Y)<br />
{<br />
Randomize();<br />
Button1-&gt;Left=random(Form1-&gt;Width-Button1-&gt;Width) ;<br />
Button1-&gt;Top=random(Form1-&gt;Height-Button1-&gt;Height);<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/528507</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/528507</guid><dc:creator><![CDATA[YLIREBUS]]></dc:creator><pubDate>Thu, 27 May 2004 16:41:50 GMT</pubDate></item><item><title><![CDATA[Reply to OnMouseMove on Thu, 27 May 2004 16:43:02 GMT]]></title><description><![CDATA[<p>Statt als neue Koordinaten immer denselben festen Wert (2) anzugeben musst du halt dynamische Werte verwenden.<br />
Lösungsansatz:<br />
- im OnMouseMove neue Zufallswerte aus Formhöhe minus Buttonhöhe und Formbreite minus Buttonbreite generieren (siehe rand(), randomize() etc.)<br />
- prüfen, dass die Werte mindestens <em>n</em> Pixel Unterschied zur derzeitigen Position aufweisen, sonst wiederholen<br />
- Button auf neue Position setzen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/528508</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/528508</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Thu, 27 May 2004 16:43:02 GMT</pubDate></item><item><title><![CDATA[Reply to OnMouseMove on Thu, 27 May 2004 16:45:39 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich würde Randomize() nur einmal aufrufen.</p>
<p>MfG<br />
tuküe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/528510</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/528510</guid><dc:creator><![CDATA[tuküe]]></dc:creator><pubDate>Thu, 27 May 2004 16:45:39 GMT</pubDate></item><item><title><![CDATA[Reply to OnMouseMove on Thu, 27 May 2004 17:53:30 GMT]]></title><description><![CDATA[<p>Danke für schnelle antworten .</p>
]]></description><link>https://www.c-plusplus.net/forum/post/528556</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/528556</guid><dc:creator><![CDATA[Tomek-gast]]></dc:creator><pubDate>Thu, 27 May 2004 17:53:30 GMT</pubDate></item><item><title><![CDATA[Reply to OnMouseMove on Fri, 28 May 2004 12:09:54 GMT]]></title><description><![CDATA[<p>warum randomize() nuir eimal aufrufen? jedes mal wenn du randomize aufrufst, wird eine neue zufallszahlen liste erstellt... also warum n ich öffters diese liste erstellen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/528964</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/528964</guid><dc:creator><![CDATA[DreadlockFilbert]]></dc:creator><pubDate>Fri, 28 May 2004 12:09:54 GMT</pubDate></item></channel></rss>