Hi All,
I am not at all good with using declares and need some help using Cocoa function - windowNumberAtPoint.
Here is my declare;
Declare Function windowNumberAtPoint Lib “Cocoa” Selector “windowNumberAtPoint:” (point As NSPoint, belowWindowWithWindowNumber As Integer) As Integer
I’ve defined a structure for NSPoint
X As Single
Y As Single
And calling it here;
Dim point As NSPoint
point.X = 100
point.Y = 150
Dim winNumber As Integer = windowNumberAtPoint(point, 0)
The code always returns 0 as the window number regardless of what window is under that mouse location.
I am guessing that I’ve not declared it correctly.
Any help is gratefully received