You can create a click-through window by adding the WS_EX_LAYERED and WS_EX_TRANSPARENT to its advanced styles. Also, so that it is always on top, set its TopMost to true and make it translucent, use the appropriate Opacity value:
using System; using System.Windows.Forms; using System.Runtime.InteropServices; public partial class Form1 : Form { public Form1() { InitializeComponent(); this.Opacity = 0.5; this.TopMost = true; } [DllImport("user32.dll", SetLastError = true)] static extern int GetWindowLong(IntPtr hWnd, int nIndex); [DllImport("user32.dll")] static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); const int GWL_EXSTYLE = -20; const int WS_EX_LAYERED = 0x80000; const int WS_EX_TRANSPARENT = 0x20; protected override void OnLoad(EventArgs e) { base.OnLoad(e); var style = GetWindowLong(this.Handle, GWL_EXSTYLE); SetWindowLong(this.Handle,GWL_EXSTYLE , style | WS_EX_LAYERED | WS_EX_TRANSPARENT); } }
Sample Result

source share