As described here I managed to have a Windows-Form one can click through.
My (in my opinion for this question most) relevant code parts read as follows:
First imports:
...
Imports System.Runtime.InteropServices
...
then definition and import of DLLs
...
Private InitialStyle As Integer
Dim PercentVisible As Decimal
...
<DllImport("user32.dll", EntryPoint:="GetWindowLong")> Public Shared Function GetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer) As Integer
End Function
<DllImport("user32.dll", EntryPoint:="SetWindowLong")> Public Shared Function SetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer, ByVal dwNewLong As Integer) As Integer
End Function
<DllImport("user32.dll", EntryPoint:="SetLayeredWindowAttributes")> Public Shared Function SetLayeredWindowAttributes(ByVal hWnd As IntPtr, ByVal crKey As Integer, ByVal alpha As Byte, ByVal dwFlags As Integer) As Boolean
End Function
...
and finally using it
...
InitialStyle = GetWindowLong(Me.Handle, -20)
PercentVisible = 0.8
SetWindowLong(Me.Handle, -20, InitialStyle Or &H80000 Or &H20)
SetLayeredWindowAttributes(Me.Handle, 0, 255 * PercentVisible, &H2)
...
As mentioned, this code makes it possible to click throug a windows form, so the clicks reach the programm placed behind the windows form. In my opinion the feature is best described as color filter for parts of or the whole monitor.
Is there a possibility to modify the code in such a way, that only left clicks are transferred through the form? Right mouse clicks are needed to open a contextmenu or the like...