<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.xfce.org/extern.php?action=feed&amp;tid=7686&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Xfce Forums / how to make a transparent and permeable to the cursor separate window]]></title>
		<link>http://forum.xfce.org/viewtopic.php?id=7686</link>
		<description><![CDATA[The most recent posts in how to make a transparent and permeable to the cursor separate window.]]></description>
		<lastBuildDate>Thu, 20 Dec 2012 06:04:19 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[how to make a transparent and permeable to the cursor separate window]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=28347#p28347</link>
			<description><![CDATA[<p>in windows(7,xp,vista) task was to make a modifier windows which made transparent and permeable to&#160; mouse selected window<br />which was solved by autoita (this is such a scripting language based on windose api)</p><p>sample code</p><p>#include &lt;ButtonConstants.au3&gt;<br />#include &lt;GUIConstantsEx.au3&gt;<br />#include &lt;StaticConstants.au3&gt;<br />#include &lt;WindowsConstants.au3&gt;<br />#include &lt;WinApi.au3&gt;<br />;selection&#160; window for transparency&#160; and permeability mouse</p><p>#Region ### START Koda GUI section ### Form=<br />$Form1 = GUICreate(&quot;transform_to_ win&quot;, 489, 194, 428, 368)<br />$Label1 = GUICtrlCreateLabel(&quot;none&quot;, 8, 16, 473, 17)<br />$Input1 = GUICtrlCreateInput(&quot;150&quot;, 8, 48, 473, 21)<br />$Label2 = GUICtrlCreateLabel(&quot;Enter a number from 0 to 255 to set the transparency of the window (default 150) and press&quot;, 11, 72, 466, 17)<br />$Label3 = GUICtrlCreateLabel(&quot;Next button to move&#160; the selected window and you wait 10 seconds&quot;, 72, 96, 347, 17)<br />$Button1 = GUICtrlCreateButton(&quot;Next&quot;, 8, 120, 473, 49, $WS_GROUP)<br />GUISetState(@SW_SHOW)<br />#EndRegion ### END Koda GUI section ###</p><br /><br /><br /><p>While 1<br />&#160; &#160; $nMsg = GUIGetMsg()<br />&#160; &#160; Switch $nMsg<br />&#160; &#160; &#160; &#160; Case $GUI_EVENT_CLOSE<br />&#160; &#160; &#160; &#160; &#160; &#160; Exit<br />&#160; &#160; &#160; &#160; Case $Button1<br />&#160; &#160; &#160; &#160; &#160; &#160; Sleep(5000)<br />&#160; &#160; &#160; &#160; &#160; &#160; $set00 = GUICtrlRead($Input1)<br />&#160; &#160; &#160; &#160; &#160; &#160; $txt0 = _WinAPI_GetMousePos()<br />&#160; &#160; &#160; &#160; &#160; &#160; $txt1 = _WinAPI_WindowFromPoint($txt0)<br />&#160; &#160; &#160; &#160; &#160; &#160; $txt2 = _WinAPI_GetWindowText($txt1)<br />&#160; &#160; &#160; &#160; &#160; &#160; Sleep(5000)<br />&#160; &#160; &#160; &#160; &#160; &#160; _WinStyles()<br />&#160; &#160; &#160; &#160; &#160; &#160; $Label1 = GUICtrlCreateLabel($txt2, 8, 16, 473, 17)<br />&#160; &#160; EndSwitch<br />WEnd</p><p>Func _WinStyles()<br />Dim $txt2&#160; &#160; <br />$hWnd = WinGetHandle($txt2)<br />$nStyle = _WinGetStyle($hWnd, 0)<br />$nExStyle = _WinGetStyle($hWnd, 1)</p><p>_WinSetStyle($hWnd,&#160; -1,BitOr($nExStyle, BitOr($WS_EX_TRANSPARENT, $WS_EX_TOPMOST)))<br />WinSetTrans($hWnd,&quot;&quot;,$set00);150 replaced by the variable<br />WinSetOnTop($hWnd,&quot;&quot;,1)<br />EndFunc</p><p>Func _WinSetStyle($hWnd, $nStyle = -1, $nExStyle = 0)<br />&#160; &#160; Local Const $GWL_STYLE = -16, $GWL_EXSTYLE = -20<br />&#160; &#160; Local Const $SWP_NOMOVE = 0x2, $SWP_NOSIZE = 0x1, $SWP_SHOWWINDOW = 0x40, $SWP_NOZORDER = 0x4<br />&#160; &#160; Local $iFlags = BitOR($SWP_SHOWWINDOW, $SWP_NOSIZE, $SWP_NOZORDER)<br />&#160; &#160;<br />&#160; &#160; If $nStyle = -1 Then<br />&#160; &#160; &#160; &#160; $nStyle = BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU)<br />&#160; &#160; EndIf<br />&#160; &#160; $Pos = WinGetpos($hWnd)<br />&#160; &#160; $x = $Pos[0]<br />&#160; &#160; $y = $Pos[1]<br />&#160; &#160;<br />&#160; &#160; DllCall(&quot;User32.dll&quot;, &quot;int&quot;, &quot;SetWindowLong&quot;, &quot;hwnd&quot;, $hWnd, &quot;int&quot;, $GWL_STYLE, &quot;int&quot;, $nStyle)<br />&#160; &#160; DllCall(&quot;User32.dll&quot;, &quot;int&quot;, &quot;SetWindowLong&quot;, &quot;hwnd&quot;, $hWnd, &quot;int&quot;, $GWL_EXSTYLE, &quot;int&quot;, $nExStyle)<br />&#160; &#160; DllCall(&quot;User32.dll&quot;, &quot;int&quot;, &quot;SetWindowPos&quot;, &quot;hwnd&quot;, $hWnd, &quot;hwnd&quot;, 0, &quot;int&quot;, $x + 1, &quot;int&quot;, $y + 1 , &quot;int&quot;, 0, &quot;int&quot;, 0, &quot;int&quot;, $iFlags)<br />EndFunc</p><p>Func _WinGetStyle($hWnd, $iIndex = 0)<br />&#160; &#160; Local Const $GWL_STYLE = -16, $GWL_EXSTYLE = -20<br />&#160; &#160;<br />&#160; &#160; Local $iGWL_Index = $GWL_STYLE<br />&#160; &#160;<br />&#160; &#160; If $iIndex &gt; 0 Then<br />&#160; &#160; &#160; &#160; $iGWL_Index = $GWL_EXSTYLE<br />&#160; &#160; EndIf<br />&#160; &#160;<br />&#160; &#160; Local $aStyles = DllCall(&#039;User32.dll&#039;, &#039;long&#039;, &#039;GetWindowLong&#039;, &#039;hwnd&#039;, $hWnd, &#039;int&#039;, $iGWL_Index)<br />&#160; &#160; Return $aStyles[0]<br />EndFunc</p><br /><p>Is it possible to make a similar&#160; in xfce<br />p.s. I used it to watch the video (vlc) in the semi-transparent overlay with access to the desktop as the window player (vlc)&#160; is permeable to mouse clicks<br />p.p.s. If&#160; that is not clear please&#160; ask because English is not my native language</p>]]></description>
			<author><![CDATA[dummy@example.com (fgfgdf5)]]></author>
			<pubDate>Thu, 20 Dec 2012 06:04:19 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=28347#p28347</guid>
		</item>
	</channel>
</rss>
