<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: GUI поверх определённого окна]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=18060&amp;type=atom" />
	<updated>2024-01-13T11:57:07Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=18060</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI поверх определённого окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=159894#p159894" />
			<content type="html"><![CDATA[<p>В результате получился такой код (счётчик в окне браузера):<br /></p><div class="codebox"><pre><code>WinWait Серый форум — Mozilla Firefox
Gui, Parent: New, +hwndhParent, Owner
Gui, Parent: Color, F7F7F9
Gui, Parent: Font, s10, Verdana
Gui, Parent: -Caption
Gui, Parent: Add, Text, Limit2 x0 y0, vFirstName
Gui, Parent: Add, UpDown, Range0-99,
Gui, Parent: Font, s10, MS sans serif
Gui, Show, x37 y7	
Gui, Show, w15 h18
Send {F2}
F2:: DllCall(&quot;SetParent&quot;, &quot;Ptr&quot;, hParent, &quot;Ptr&quot;, WinExist(&quot;Серый форум — Mozilla Firefox&quot;))
Return</code></pre></div><p>Догадываюсь, что некрасивый, но работает.<br />В варианте от <strong>__Михаил__</strong>, Gui перемещается вместе с окном в любое место, что важно.</p>]]></content>
			<author>
				<name><![CDATA[p.polena]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33346</uri>
			</author>
			<updated>2024-01-13T11:57:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=159894#p159894</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI поверх определённого окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=159890#p159890" />
			<content type="html"><![CDATA[<p>SetParent здесь не нужно, нужно лишь присвоить, как упомянул <strong>serzh82saratov</strong>, окно-владелец (owner).<br /></p><div class="codebox"><pre><code>Run notepad,,, PID
WinWait ahk_pid %PID%
hWnd := WinExist()

Gui, +Owner%hWnd%
Gui, Show, w300 h300</code></pre></div><p>Теперь Gui всегда будет над блокнотом.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-01-13T01:10:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=159890#p159890</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI поверх определённого окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=159889#p159889" />
			<content type="html"><![CDATA[<p><strong>p.polena</strong><br />Поиск позволяет найти многое, главное хоть немного понимать что нужно искать. Собрал небольшой пример, не факт что всё верно. После запуска скрипта выбрать нужное окно и нажать &#039;F2&#039;.</p><div class="codebox"><pre><code>;[serzh82saratov] 01.10.2020	http://forum.script-coding.com/viewtopic.php?pid=142394#p142394
Gui, Parent: New, +hwndhParent, Owner
Gui, Parent: Color, 0
Gui, Parent: +Lastfound +ToolWindow +AlwaysOnTop -Caption -Border
Gui, Parent: Add, Edit, x2 y2 w100 gOk vText, ...Test...
Gui, Show, x0 y0	; Позиция когда сработает прикрепление своего Gui.
Return

F2:: DllCall(&quot;SetParent&quot;, &quot;Ptr&quot;, hParent, &quot;Ptr&quot;, WinExist(&quot;A&quot;))	; Привязать своё Gui к текущему:

Ok:	; Срабатывает при вводе в контрол:
Gui, Submit, NoHide
ToolTip, % Text, 0, -30
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2024-01-12T19:39:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=159889#p159889</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI поверх определённого окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=159882#p159882" />
			<content type="html"><![CDATA[<p>Про Owner читайте.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2024-01-12T00:30:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=159882#p159882</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI поверх определённого окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=159881#p159881" />
			<content type="html"><![CDATA[<p>&quot;В поиске искать&quot; - отличная фраза. Было нечто подобное, но без блюдечка с каёмочкой.</p>]]></content>
			<author>
				<name><![CDATA[p.polena]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33346</uri>
			</author>
			<updated>2024-01-11T22:03:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=159881#p159881</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI поверх определённого окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=159880#p159880" />
			<content type="html"><![CDATA[<p><strong>p.polena</strong>, в поиске надо искать, было такое.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2024-01-11T20:51:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=159880#p159880</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: GUI поверх определённого окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=159878#p159878" />
			<content type="html"><![CDATA[<p>Приветствую. Можно ли активировать GUI поверх только определённого окна (по ID, NAME, etk)? Т.е. чтобы в окне, которое перекрывает нужное, GUI не отображался.<br /></p><div class="codebox"><pre><code>Gui, : -Caption +AlwaysOnTop +ToolWindow +LastFound</code></pre></div><p>Окна не в полноэкранном режиме.</p>]]></content>
			<author>
				<name><![CDATA[p.polena]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33346</uri>
			</author>
			<updated>2024-01-11T15:58:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=159878#p159878</id>
		</entry>
</feed>
