<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Прозрачность отдельного элемента]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=10066&amp;type=atom" />
	<updated>2014-10-23T09:05:28Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=10066</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87687#p87687" />
			<content type="html"><![CDATA[<p>*шмырг* Читаю такие темы, и прям ностальгия наваливается *шмырг-шмырг*</p>]]></content>
			<author>
				<name><![CDATA[Mikki]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5905</uri>
			</author>
			<updated>2014-10-23T09:05:28Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87687#p87687</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87683#p87683" />
			<content type="html"><![CDATA[<p>Спасибо <strong>teadrinke</strong>r, скрипт в посте 29 идеален для меня <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />.</p>]]></content>
			<author>
				<name><![CDATA[sergeiplugatyr]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30382</uri>
			</author>
			<updated>2014-10-23T00:40:23Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87683#p87683</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87677#p87677" />
			<content type="html"><![CDATA[<p>Скорее всего, по-другому и не получится. Окно с ActiveX хотя бы на мгновение должно получить клавиатурный фокус (а значит и активность), т. к. в ином случае невозможно будет взаимодействовать с его элементами управления (если таковые есть). </p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;Вариант без получения активности</div><div class="fancy_spoiler"><div class="codebox"><pre><code>SetWinDelay, 0
global hMainGui, hChildGui, hWorkGui

Gui, Main: +hwndhMainGui +LastFound
Gui, Child: +hwndhChildGui -Caption +ParentMain
Gui, Child: Color, 123456
WinSet, TransColor, 123456
Gui, Main: Add, Button, x227 y167 w65 h23 gPlay, Play
Gui, Main: Show, w300 h200
Gui, Child: Show, x10 y10 w280 h150

Gui, Work: +hwndhWorkGui -Caption +ToolWindow +LastFound
Gui, Work: Add, ActiveX, x0 y0 w280 h150 vWMP, WMPlayer.OCX.7
WMP.url := A_WinDir &quot;\Media\tada.wav&quot;
WMP.controls.stop

WinSet, Transparent, 180
WinGetPos, X, Y,,, ahk_id %hChildGui%
Gui, Work: Show, x%X% y%Y% w280 h150 NA

OnMessage(0x6, &quot;WM_ACTIVATE&quot;)
OnMessage(0x3, &quot;WM_MOVE&quot;)
OnExit, Exit
Return

Play:
   WMP.controls.play
   Return

Exit:
   DllCall(&quot;DeregisterShellHookWindow&quot;, &quot;UInt&quot;, A_ScriptHwnd)
   ExitApp

MainGuiClose:
   Gui, Main: Cancel
   ExitApp
   
WM_MOVE(wp, lp, msg, hwnd)
{
   if (hwnd != hMainGui)
      Return
   
   WinGetPos, X, Y,,, ahk_id %hChildGui%
   Gui, Work: Show, x%X% y%Y% NA
}

WM_ACTIVATE(wp, lp, msg, hwnd)
{
   if (hwnd != hWorkGui)
      Return
   
   if (wp &amp; 0xFFFF != 0)
      WinActivate, ahk_id %hMainGui%
}</code></pre></div></div></div><p>В нём не получается взаимодействовать с кнопками плеера.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-10-22T19:19:51Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87677#p87677</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87675#p87675" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Очередной экспонат для Коллекции!</p></blockquote></div><p>Доработать для Коллекции надо, чтобы не мелькало. Может, кто предложит чего.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-10-22T18:32:09Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87675#p87675</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87674#p87674" />
			<content type="html"><![CDATA[<p><strong>sergeiplugatyr</strong>, беги за поллитрой! <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-10-22T18:15:34Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87674#p87674</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87673#p87673" />
			<content type="html"><![CDATA[<p>Получилось, но не айс. С подпорками, и всё же окно с ActiveX иногда на мгновение становится активным, возникает мелькание.<br /></p><div class="codebox"><pre><code>SetWinDelay, 0
global hMainGui, hChildGui, hWorkGui

Gui, Main: +hwndhMainGui +LastFound
Gui, Child: +hwndhChildGui -Caption +ParentMain
Gui, Child: Color, 123456
WinSet, TransColor, 123456
Gui, Main: Add, Button, x227 y167 w65 h23 gPlay, Play
Gui, Main: Show, w300 h200
Gui, Child: Show, x10 y10 w280 h150

Gui, Work: +hwndhWorkGui -Caption +ToolWindow +LastFound +OwnerMain
Gui, Work: Add, ActiveX, x0 y0 w280 h150 vWMP, WMPlayer.OCX.7
WMP.url := A_WinDir &quot;\Media\tada.wav&quot;
WMP.controls.stop

WinSet, ExStyle, +0x8000000   ; WS_EX_NOACTIVATE
WinSet, Transparent, 150
WinGetPos, X, Y,,, ahk_id %hChildGui%
Gui, Work: Show, x%X% y%Y% w280 h150 NA

DllCall(&quot;RegisterShellHookWindow&quot;, &quot;UInt&quot;, A_ScriptHwnd) 
OnMessage(DllCall(&quot;RegisterWindowMessage&quot;, &quot;str&quot;, &quot;SHELLHOOK&quot;), &quot;ShellProc&quot;)
OnMessage(0x3, &quot;WM_MOVE&quot;)
OnExit, Exit
Return

Play:
   WMP.controls.play
   Return

Exit:
   DllCall(&quot;DeregisterShellHookWindow&quot;, &quot;UInt&quot;, A_ScriptHwnd)
   ExitApp

MainGuiClose:
   Gui, Main: Cancel
   ExitApp
   
WM_MOVE(wp, lp, msg, hwnd)
{
   if (hwnd != hMainGui)
      Return
   
   WinGetPos, X, Y,,, ahk_id %hChildGui%
   Gui, Work: Show, x%X% y%Y% NA
}

ShellProc(nCode, wParam)
{ 
   if (nCode = 4 &amp;&amp; WinActive(&quot;ahk_id&quot; hWorkGui))   ; HSHELL_WINDOWACTIVATED := 4
      WinActivate, ahk_id %hMainGui%
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-10-22T17:33:36Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87673#p87673</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87672#p87672" />
			<content type="html"><![CDATA[<p>Тут уже написано:<br /><a href="http://www.autohotkey.com/board/topic/100835-semi-transparent-pictureoverlay-in-gui/">http://www.autohotkey.com/board/topic/1 … ay-in-gui/</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-22T14:26:09Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87672#p87672</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87671#p87671" />
			<content type="html"><![CDATA[<p>Напишу попозже.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-10-22T13:58:42Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87671#p87671</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87670#p87670" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Если совсем извратится, то через WinSet Region вырезать кусок окна, поместить туда другое прозрачное окно, применить к нему WS_EX_NOACTIVATE, ну и следить за перемещением основного окна.</p></blockquote></div><p>Так можно. Тоже думал об этом, но не знал, что есть такой стиль.</p></blockquote></div><p>Пробовал. Не придумал, как организовать быстро перемещение. Всё рывками, на нервы действует.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-10-22T13:57:15Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87670#p87670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87669#p87669" />
			<content type="html"><![CDATA[<p>Да, не подходит мой вариант.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-22T11:34:02Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87669#p87669</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87668#p87668" />
			<content type="html"><![CDATA[<p>И что в таком одноцветном контроле будет отображаться (учитывая, что это ActiveX) ?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-10-22T11:22:01Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87668#p87668</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87667#p87667" />
			<content type="html"><![CDATA[<p>Сделать контрол определенного цвета и применить к нему WinSet, Transcolor с нужной прозрачностью.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-22T11:20:02Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87667#p87667</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87666#p87666" />
			<content type="html"><![CDATA[<p>Ну, а дальше что?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-10-22T11:04:23Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87666#p87666</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87665#p87665" />
			<content type="html"><![CDATA[<p>Все-таки не понял, почему так нельзя?<br /></p><div class="codebox"><pre><code>#Persistent
#SingleInstance, Force
Gui, Add, Progress, x0 y0 w300 h20 100
Gui, Color, 000111
Gui, Show, W400 H300, Test
WinSet, Transcolor, 000111, Test
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-22T11:02:50Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87665#p87665</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прозрачность отдельного элемента]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87663#p87663" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Если совсем извратится, то через WinSet Region вырезать кусок окна, поместить туда другое прозрачное окно, применить к нему WS_EX_NOACTIVATE, ну и следить за перемещением основного окна.</p></blockquote></div><p>Так можно. Тоже думал об этом, но не знал, что есть такой стиль.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-10-22T10:58:28Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87663#p87663</id>
		</entry>
</feed>
