<?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[Problem Mit der Funktion SetWindowPos()]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>Ich will ein fremdes Window nach vorne bringen. Mein Problem ist, dass das Fenster minimiert ist bringt die Funktion AppActivate() nicht nach vorne.</p>
<p>Das Funktioniert nur wenn das Fenster sich normal Große befindet.</p>
<p>SetWindowPos() helft auch nicht. was mache ich falsch?</p>
<p>Code:<br />
Private Const HWND_TOP = 0&amp;</p>
<p>Dim proclist() As Process = Process.GetProcessesByName(&quot;Notepad&quot;)<br />
Dim RetVal As Long<br />
For Each p As Process In proclist<br />
If <a href="http://p.Id" rel="nofollow">p.Id</a> &lt;&gt; Process.GetCurrentProcess().Id Then<br />
SetWindowPos(<a href="http://p.Id" rel="nofollow">p.Id</a>, HWND_TOP, 0, 0, 768, 1024, 3)</p>
<p>TextBox1.Text = <a href="http://p.Id" rel="nofollow">p.Id</a><br />
AppActivate(&quot;Unbenannt&quot;)<br />
End If<br />
Next</p>
<p>End Sub<br />
Gruß<br />
S.Mathi</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/171703/problem-mit-der-funktion-setwindowpos</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 20:45:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/171703.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 28 Jan 2007 15:40:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Sun, 28 Jan 2007 15:50:18 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>Ich will ein fremdes Window nach vorne bringen. Mein Problem ist, dass das Fenster minimiert ist bringt die Funktion AppActivate() nicht nach vorne.</p>
<p>Das Funktioniert nur wenn das Fenster sich normal Große befindet.</p>
<p>SetWindowPos() helft auch nicht. was mache ich falsch?</p>
<p>Code:<br />
Private Const HWND_TOP = 0&amp;</p>
<p>Dim proclist() As Process = Process.GetProcessesByName(&quot;Notepad&quot;)<br />
Dim RetVal As Long<br />
For Each p As Process In proclist<br />
If <a href="http://p.Id" rel="nofollow">p.Id</a> &lt;&gt; Process.GetCurrentProcess().Id Then<br />
SetWindowPos(<a href="http://p.Id" rel="nofollow">p.Id</a>, HWND_TOP, 0, 0, 768, 1024, 3)</p>
<p>TextBox1.Text = <a href="http://p.Id" rel="nofollow">p.Id</a><br />
AppActivate(&quot;Unbenannt&quot;)<br />
End If<br />
Next</p>
<p>End Sub<br />
Gruß<br />
S.Mathi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1218667</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1218667</guid><dc:creator><![CDATA[smathi]]></dc:creator><pubDate>Sun, 28 Jan 2007 15:50:18 GMT</pubDate></item><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Sun, 28 Jan 2007 16:11:13 GMT]]></title><description><![CDATA[<p>SetWindowPos () braucht als ersten Parameter das Handle des Fensters und nicht die Prozess-ID.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1218690</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1218690</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 28 Jan 2007 16:11:13 GMT</pubDate></item><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Sun, 28 Jan 2007 17:04:12 GMT]]></title><description><![CDATA[<p>Kann man von <a href="http://Process.ID" rel="nofollow">Process.ID</a> oder Von WindowTitel Handle holen und wie?</p>
<p>Dim XhWnd As Long<br />
XhWnd = FindWindow(&quot;Notepad&quot;, &quot;Unbenannt - Editor&quot;)</p>
<p>SetWindowPos(XhWnd, HWND_TOP, 0, 0, 768, 1024, 3)<br />
das hat auch nicht geholfen.</p>
<p>Danke<br />
S.Mathi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1218713</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1218713</guid><dc:creator><![CDATA[smathi]]></dc:creator><pubDate>Sun, 28 Jan 2007 17:04:12 GMT</pubDate></item><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Sun, 28 Jan 2007 18:03:02 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>warum liefert FindWindow() eine Zahl &gt;0 auch wenn Notepad nicht geöffnet ist?</p>
<p>Dim XhWnd As Long<br />
XhWnd = FindWindow(&quot;Notepad&quot;, 0&amp;)</p>
<p>Danke<br />
S.Mathi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1218758</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1218758</guid><dc:creator><![CDATA[smathi]]></dc:creator><pubDate>Sun, 28 Jan 2007 18:03:02 GMT</pubDate></item><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Sun, 28 Jan 2007 18:18:07 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ein paar Threads weiter unten wurde die selbe Frage auch von mir gestellt und beantwortet. Ich erkläre es dir nochmal:</p>
<p>Das Fenster muss garnicht &quot;sichtbar&quot; sein, damit es funktioniert. Folgendermaßen holst du es nach vorne:</p>
<pre><code class="language-cpp">SetWindowPos(hwnd, HWND_TOPMOST, NULL, NULL, NULL, NULL, SWP_NOMOVE | SWP_NOSIZE);
</code></pre>
<p>EDIT: <strong>Das ist kein C++ was du das hast !!</strong></p>
<p>Viel Glück noch,</p>
<p>mikey.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1218760</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1218760</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Sun, 28 Jan 2007 18:18:07 GMT</pubDate></item><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Sun, 28 Jan 2007 18:21:30 GMT]]></title><description><![CDATA[<p>Ich habe VB von VS2003.</p>
<p>warum liefert FindWindow() eine Zahl &gt;0 auch wenn Notepad nicht geöffnet ist?</p>
<p>Dim XhWnd As Long<br />
XhWnd = FindWindow(&quot;Notepad&quot;, 0&amp;)</p>
<p>Die Zahl sieht so aus: 55169095435288576 das ist handle oder?</p>
<p>Gruß<br />
S.Mathi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1218773</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1218773</guid><dc:creator><![CDATA[smathi]]></dc:creator><pubDate>Sun, 28 Jan 2007 18:21:30 GMT</pubDate></item><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Sun, 28 Jan 2007 18:25:47 GMT]]></title><description><![CDATA[<p>Keine Ahnung, normalerweise ist ein Handle eine Adresse. Als Zahl habe ich das noch nie gesehen ...</p>
<p>Zudem sind wir hier ein C++ Forum, und nicht VB <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1218775</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1218775</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Sun, 28 Jan 2007 18:25:47 GMT</pubDate></item><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Mon, 29 Jan 2007 21:34:26 GMT]]></title><description><![CDATA[<p>smathi schrieb:</p>
<blockquote>
<p>Ich will ein fremdes Window nach vorne bringen. Mein Problem ist, dass das Fenster minimiert ist (...)</p>
</blockquote>
<p>Dazu reicht :</p>
<pre><code>ShowWindow (FindWindow (&quot;Notepad&quot;,0),3);

3 -&gt; SW_SHOWMAXIMIZED
</code></pre>
<p>Allerdings gibt es Probleme falls mehrere Instanzen von Notepad laufen.<br />
FindWindow () liefert immer nur das erste Fenster zurück (welches auch immer das sein soll bei mehreren Instanzen).</p>
<p>smathi schrieb:</p>
<blockquote>
<p>warum liefert FindWindow() eine Zahl &gt;0 auch wenn Notepad nicht geöffnet ist? (...)<br />
Die Zahl sieht so aus: 55169095435288576 das ist handle oder?</p>
</blockquote>
<pre><code>dezimal     : 55169095435288576
hexadezimal : 00C4 0000 0000 0000
</code></pre>
<p>Kann denn das ein Handle sein ? Vergleiche diese Zahl mal mit einem erfolgreich zurückgelieferten Handle.</p>
<p>mikey schrieb:</p>
<blockquote>
<p>Keine Ahnung, normalerweise ist ein Handle eine Adresse.</p>
</blockquote>
<p>Ein Handle ist eine Verwaltungsnummer unter der dem Betriebssystem ein Objekt bekannt ist. Handles sind niemals Adressen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1219460</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1219460</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 29 Jan 2007 21:34:26 GMT</pubDate></item><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Mon, 29 Jan 2007 21:57:04 GMT]]></title><description><![CDATA[<p>merker schrieb:</p>
<blockquote>
<p>mikey schrieb:</p>
<blockquote>
<p>Keine Ahnung, normalerweise ist ein Handle eine Adresse.</p>
</blockquote>
<p>Ein Handle ist eine Verwaltungsnummer unter der dem Betriebssystem ein Objekt bekannt ist. Handles sind niemals Adressen.</p>
</blockquote>
<p>Mehr oder minder Unsinn! Du solltest Deine Aussage nochmal überdenken.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1219467</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1219467</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Mon, 29 Jan 2007 21:57:04 GMT</pubDate></item><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Tue, 30 Jan 2007 18:21:08 GMT]]></title><description><![CDATA[<p>Also was ist es dann letztendlich ??</p>
<p>Ein Handle ist, soweit ich weis, ein ganz normaler pointer.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220074</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Tue, 30 Jan 2007 18:21:08 GMT</pubDate></item><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Tue, 30 Jan 2007 18:35:02 GMT]]></title><description><![CDATA[<p>Handles bestehen aus einer betriebssystemweit einmaligen numerischen Adresse. Diese Adresse kann eine (laufende) Nummer sein, oder die Anfangsspeicheradresse des Objektes.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220083</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220083</guid><dc:creator><![CDATA[hjg]]></dc:creator><pubDate>Tue, 30 Jan 2007 18:35:02 GMT</pubDate></item><item><title><![CDATA[Reply to Problem Mit der Funktion SetWindowPos() on Wed, 31 Jan 2007 00:33:15 GMT]]></title><description><![CDATA[<p>Ein Handle referenziert übrigens immer eine interne -von Windows verwaltete- Struktur.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1220255</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1220255</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Wed, 31 Jan 2007 00:33:15 GMT</pubDate></item></channel></rss>