I need to detect what kind of component the user has clicked on. For this I am using the following check, every time the left mouse button is clicked:
if FindDragTarget(Mouse.CursorPos, True).ClassType = TEdit then
//Código
However, when the user clicks on the windows virtual keyboard and its keys, I get the message from Access Violation
; I guess it's because it's calling the function but it does not recognize the type of component. I am in Windows 10
and my Delphi
is XE7
; it may not recognize the virtual keyboard component and thus can not perform the verification. Anyway, are there other alternatives to check what kind of component the user clicked on?