<?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=12526&amp;type=atom" />
	<updated>2017-03-08T10:43:05Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12526</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113720#p113720" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Этот вариант работает очень стабильно (и Win7 и Win10). Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[mozers]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=4112</uri>
			</author>
			<updated>2017-03-08T10:43:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113720#p113720</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113719#p113719" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>SetWinDelay -1
SetBatchLines -1
Gui +LastFound -Caption +toolwindow +hwndhGui -
bgcolor = 000000
Gui, Color, %bgcolor%
Gui, Font, s16 cFFFFFF bold
linespace = y+8
Gui, Add, Text,%linespace%, Имя АРМ: %A_ComputerName%
Gui, Add, Text,%linespace%, Пользователь: %A_UserName%

WinSet, TransColor, %bgcolor% 255
xpos := A_ScreenWidth - 550
Gui, Show, NoActivate AutoSize x%xpos% y20

loop
{
   WinGet, list, list
   if !hDesktop := WinExist(&quot;ahk_class WorkerW&quot;)
   {
      list--
      if (list%list% != hGui)
         WinSet, Bottom,, ahk_id %hGui%
   }
   else
   {
      loop % list
      {
         if (List%A_Index% = hGui)
            break
         WinGetClass, class, % &quot;ahk_id &quot; List%A_Index%
         if (class = &quot;WorkerW&quot;) or (class = &quot;&quot;)
         {
            loop 2
               WinSet, AlwaysOnTop,, ahk_id %hGui%
            break
         }
      }
   }
   sleep 50
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-03-08T08:09:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113719#p113719</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113717#p113717" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, очень интересный вариант.<br />Сначала (Win10) - не работало (окно сворачивалось). Перенес на Win7 - заработало со 2 запуска. Потом вновь запускал и на Win10 и на Win7 - работает (не сворачивается). Но почему то иногда (~1 раз из 10) не срабатывает. Пытался поймать закономерность (запускал напрямую из кода, предварительно откомпилировав, во всех случаях кроме Тотала и SciTE дополнительные открытые окна закрывал) - никакой зависимости так и не обнаружил. Вот сейчас - работает. Уже раз 20 перезапустил...</p>]]></content>
			<author>
				<name><![CDATA[mozers]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=4112</uri>
			</author>
			<updated>2017-03-08T07:00:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113717#p113717</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113714#p113714" />
			<content type="html"><![CDATA[<p>Так сворачивается по «Свернуть все окна».</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-03-07T19:11:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113714#p113714</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113712#p113712" />
			<content type="html"><![CDATA[<p>А так?<br /></p><div class="codebox"><pre><code>SetWinDelay -1
DetectHiddenWindows on
WinGet, list, list, ahk_class WorkerW
hDesktop := list%list%
Gui +LastFound -Caption +toolwindow +hwndhGui

bgcolor = 000000
Gui, Color, %bgcolor%
Gui, Font, s16 cFFFFFF bold
linespace = y+8
Gui, Add, Text,%linespace%, Имя АРМ: %A_ComputerName%
Gui, Add, Text,%linespace%, Пользователь: %A_UserName%

WinSet, TransColor, %bgcolor% 255

xpos := A_ScreenWidth - 550
Gui, Show, NoActivate AutoSize x%xpos% y20
loop
{
   WinWaitActive, ahk_class WorkerW
   DllCall(&quot;SetWindowPos&quot;, &quot;ptr&quot;, hDesktop, &quot;ptr&quot;, hGui, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;uint&quot;, 3) ;3 = SWP_NOSIZE|SWP_NOMOVE
   WinWaitNotActive, ahk_class WorkerW
}
return

#if WinActive(&quot;ahk_class WorkerW&quot;)
~#vk44::   ; d
~#vk4D::   ; m
sleep 50
DllCall(&quot;SetWindowPos&quot;, &quot;ptr&quot;, hDesktop, &quot;ptr&quot;, hGui, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;uint&quot;, 3) ;3 = SWP_NOSIZE|SWP_NOMOVE
return
#if</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-03-07T18:57:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113712#p113712</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113707#p113707" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, виноват, тормознул с ответом, но, к сожалению, Ваш последний вариант (в отличии от предпоследнего) у меня не работает ни на Win7 ни на Win10. Окошко скрывается по &quot;Свернуть все окна&quot;.<br />Повторю, предпоследний вариант у меня стабильно работает и с фаерфоксом и с win+d и на win7 и на win10.</p>]]></content>
			<author>
				<name><![CDATA[mozers]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=4112</uri>
			</author>
			<updated>2017-03-07T17:43:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113707#p113707</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113704#p113704" />
			<content type="html"><![CDATA[<p>Проблема в том, что прозрачность можно установить только 3 способами:<br />1) SetLayeredWindowAttributes<br /><a href="https://msdn.microsoft.com/en-us/library/ms633540.aspx">https://msdn.microsoft.com/en-us/library/ms633540.aspx</a><br />Эту функцию использует автохотки в WinSet, TransColor.<br />Но она работает с дочерними окнами при включенном desktop composition только в Win8.<br />Возможно в десятке тоже, про нее ничего не сказано.<br />2) UpdateLayeredWindow<br /><a href="https://msdn.microsoft.com/en-us/library/ms633556.aspx">https://msdn.microsoft.com/en-us/library/ms633556.aspx</a><br />Тоже самое.<br />3) Через Direct3D<br /><a href="https://msdn.microsoft.com/en-us/library/ms893092.aspx">https://msdn.microsoft.com/en-us/library/ms893092.aspx</a><br />Вот там вроде как можно установить прозрачность дочерним окнам.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-03-07T16:41:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113704#p113704</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113701#p113701" />
			<content type="html"><![CDATA[<p>Тоже был такой вопрос, никак не решил. В смысле такие же костыли. <span class="bbu">Может</span> из z - order как то удалять окно, не уверен...</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2017-03-07T16:00:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113701#p113701</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113696#p113696" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>mozers пишет:</cite><blockquote><p>И предыдущий вариант - хорош</p></blockquote></div><p>У меня он глючил в 2 случаях:<br />1) Если при максимизированном окне (тестировал на фаерфоксе) быстро нажимать win+d, то в какой-то момент надпись появлялась поверх фаерфокса, поэтому я заменилил AlwaysOnTop на SetWindowPos, чтобы надпись была только поверх десктопа.<br />2) Если при&nbsp; активном десктопе и каком нибудь развернутом приложении нажать win+d, то надпись пропадала, поэтому я вставил условие для горячих кнопок при активном десктопе.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-03-07T15:53:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113696#p113696</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113681#p113681" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>mozers</strong>, на Ваше письмо отвечаю:<br />1) По правилам русского языка в конце предложения должны быть знаки препинания. Заглавные буквы и точки - это минимальное требование по грамотности на форуме, но соблюдать его обязательно для всех. Отсутствие точки не компенсируется наличием смайлика.<br />2) Каждый пользователь при написании сообщения может поставить галочку &quot;Не показывать графические смайлики&quot;. Либо в профиле &quot;Показывать смайлы как изображения &quot; (если Вы это имели в виду). <br />Пользоваться смайлами никто не запрещал. Речь идёт об отсутствии точек.</span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2017-03-07T13:27:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113681#p113681</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113666#p113666" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />И предыдущий вариант - хорош. Даже на 10ке заработал.<br />За новый - спасибо - буду тестировать/изучать. Как въеду в смысл написанного - так буду использовать.</p>]]></content>
			<author>
				<name><![CDATA[mozers]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=4112</uri>
			</author>
			<updated>2017-03-06T18:10:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113666#p113666</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113655#p113655" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>mozers</strong>, напомню, смайлик точку не заменяет.</span> </p><div class="quotebox"><blockquote><p>У нас не чат, мы пишем аккуратно. Предложения в русском языке начинаются с большой буквы и заканчиваются точкой.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2017-03-06T15:24:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113655#p113655</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113641#p113641" />
			<content type="html"><![CDATA[<p>Потестировал - не совсем он надёжный оказался.<br />Так понадёжней:<br /></p><div class="codebox"><pre><code>SetWinDelay -1
hDesktop := WinExist(&quot;ahk_class WorkerW&quot;)
Gui +LastFound -Caption +toolwindow +hwndhGui

bgcolor = 000000
Gui, Color, %bgcolor%
Gui, Font, s16 cFFFFFF bold
linespace = y+8
Gui, Add, Text,%linespace%, Имя АРМ: %A_ComputerName%
Gui, Add, Text,%linespace%, Пользователь: %A_UserName%

WinSet, TransColor, %bgcolor% 255

xpos := A_ScreenWidth - 550
Gui, Show, NoActivate AutoSize x%xpos% y20
loop
{
   WinWaitActive, ahk_class WorkerW
   DllCall(&quot;SetWindowPos&quot;, &quot;ptr&quot;, hDesktop, &quot;ptr&quot;, hGui, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;uint&quot;, 3) ;3 = SWP_NOSIZE|SWP_NOMOVE
   WinWaitNotActive, ahk_class WorkerW
}
return

#if WinActive(&quot;ahk_class WorkerW&quot;)
~#vk44::   ; d
~#vk4D::   ; m
sleep 50
DllCall(&quot;SetWindowPos&quot;, &quot;ptr&quot;, hDesktop, &quot;ptr&quot;, hGui, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;uint&quot;, 3) ;3 = SWP_NOSIZE|SWP_NOMOVE
return
#if</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-03-06T10:47:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113641#p113641</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113639#p113639" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, спасибо, простой и надежный вариант!<br />Добавил только #NoTrayIcon и строчку для получения полных ФИО (чтоб сразу было видно к кому ты по удаленке подключился)</p><div class="codebox"><pre><code>Gui Add, Text,, % ComObjGet(&quot;LDAP://&quot; . ComObjCreate(&quot;ADSystemInfo&quot;).UserName).cn</code></pre></div><p>Все! Выбрасываю Русиновичевский BGInfo <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[mozers]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=4112</uri>
			</author>
			<updated>2017-03-06T08:46:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113639#p113639</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Неминимизируемое окно Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=113633#p113633" />
			<content type="html"><![CDATA[<p>Дочерние окна не могут быть прозрачными.<br />Хотя, при отключенном desktop composition - работает.<br />При +ToolWindow и нажатии Show Desktop, как я понимаю окно не минимизируется, а просто перекрывается десктопом.<br />Поэтому можно сделать так:<br /></p><div class="codebox"><pre><code>SetWinDelay -1
Gui +LastFound -Caption +toolwindow +hwndhGui

bgcolor = 000000
Gui, Color, %bgcolor%
Gui, Font, s16 cFFFFFF bold
linespace = y+8
Gui, Add, Text,%linespace%, Имя АРМ: %A_ComputerName%
Gui, Add, Text,%linespace%, Пользователь: %A_UserName%

WinSet, TransColor, %bgcolor% 255

xpos := A_ScreenWidth - 550
Gui, Show, NoActivate AutoSize x%xpos% y20
loop
{
   WinWaitActive, ahk_class WorkerW
   loop 2
      WinSet, AlwaysOnTop, Toggle, ahk_id %hGui%
   WinWaitNotActive, ahk_class WorkerW
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-03-05T19:00:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=113633#p113633</id>
		</entry>
</feed>
