.netvb.netscreendesktopmonitor

How to receive handle of second Monitor / Desktop


I found the default desktop function GetDesktopWindow function

What how to catch the result for a second monitor?

* EDIT SOLVED *

<Runtime.InteropServices.DllImport("user32.dll", 
CharSet:=Runtime.InteropServices.CharSet.Auto, ExactSpelling:=True)> _
Public Shared Function WindowFromPoint(ByVal x As Integer, ByVal y As Integer) 
As IntPtr
End Function

Did the trick.


Solution

  • <Runtime.InteropServices.DllImport("user32.dll", 
    CharSet:=Runtime.InteropServices.CharSet.Auto, ExactSpelling:=True)> _
    Public Shared Function WindowFromPoint(ByVal x As Integer, ByVal y As Integer) 
    As IntPtr
    End Function