Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I get in C# an Aero like transparent window that can be clicked through
    primarykey
    data
    text
    <p>What I want to do is to make an external application (process) go TopMost Aero like tranparent that can be clicked through. The problem is that I can get Aero to work or a TopMost click through window but not both. The commented part of the code (/*DwmApi... */) is the Aero code wich also removes the title bar of the process window and underneath is the code for the click through window ( I don't need alpha set if I have Aero on, here it is used for testing purposes).</p> <p>Here is a link that shows what Aero code does: <a href="http://ru11en.wordpress.com/category/mikumikudance/" rel="nofollow noreferrer">http://ru11en.wordpress.com/category/mikumikudance/</a> </p> <p>And here is a link for the clicking "through" code: <a href="https://stackoverflow.com/questions/1524035/topmost-form-clicking-through-possible">Topmost form, clicking &quot;through&quot; possible?</a></p> <p>Note that if I change GWL_STYLE=-17, the program doesn't remove the title bar anymore.</p> <p><pre> //GWL_STYLE=-16; GWL.ExStyle=-20; private void transparency_Click(object sender, EventArgs e) { ProcessItem selectedItem = (ProcessItem)this.comboBox1.SelectedItem; if (selectedItem != null) { IntPtr handle = selectedItem.Handle; if (handle != IntPtr.Zero) {</p> <code> /*DwmApi.DwmExtendIntoClientAll(handle); int num = GetWindowLong(handle, GWL_STYLE) &amp; ~WS_OVERLAPPEDWINDOW; SetWindowLong(handle, GWL_STYLE, num); SetWindowPos(handle, IntPtr.Zero, 0, 0, 0, 0, SWP__REFRESH); */ int wl = GetWindowLong(handle, GWL.ExStyle); original = wl; wl = wl | 0x80000 | 0x20; SetWindowPos(handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); SetWindowLong(handle, GWL.ExStyle, wl); SetLayeredWindowAttributes(handle, 0, 200, LWA.Alpha); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload