VersionRelease

This commit is contained in:
Digital Data - Marlon Schreiber
2019-08-26 11:41:24 +02:00
parent a4086de11b
commit c7731cbb6d
35 changed files with 8126 additions and 4491 deletions

View File

@@ -231,4 +231,18 @@ Public Class ClassWindowAPI
End Try
End Function
Public Shared Function FocusedControlinActiveWindow(WindowHandle As IntPtr) As IntPtr
Try
Dim activewindowhandle As IntPtr = GetForegroundWindow
Dim activewindowThread As IntPtr = GetWindowThreadProcessId(activewindowhandle, IntPtr.Zero)
Dim thiswindowthread As IntPtr = GetWindowThreadProcessId(WindowHandle, IntPtr.Zero)
AttachThreadInput(activewindowThread, thiswindowthread, True)
Dim focusedControlHandle As IntPtr = GetFocus()
AttachThreadInput(activewindowThread, thiswindowthread, False)
Return focusedControlHandle
Catch ex As Exception
Return Nothing
End Try
End Function
End Class