Damein Posted May 22, 2016 Share Posted May 22, 2016 So I've got an image that is a circle and I want to be able to detect when the inside of the circle is clicked. I've used If _WinAPI_PtInRectEx($aPos[0], $aPos[1], $TargetX + 5, $TargetY + 30, $TargetX + $TargetWidth, _ $TargetY + $TargetHeight) Then And that works but since its a circle it won't work. I attempted to use the CreateEllipticRgn using the following but my script crashes instantly. Dim $Range = [100, 100, 100, 100] _WinAPI_CreateEllipticRgn($Range) Not sure if I have the structure right (I doubt I do) but if there's an easier method to detect a mouse click within a circle than that would be helpful. Thanks! Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
AndyG Posted May 22, 2016 Share Posted May 22, 2016 Hi, x²+y²=r² so the distance of a point X from the middle of a circle M is if XM<r the point is inside the circle... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now