Click to See Complete Forum and Search --> : capturing mouse events for self created figures


RockStone
February 5th, 2005, 03:55 AM
Hi to all,

I have a problem

I am drawing figures like ellipses, rectangles....

And i want to know when they are clicked

I know that i ll have to use delegates and events

even i had tried these

but i am not able to get these in fact..... i know the basics of events and delegates means that how they actullay work....

I am looking for an urgent help

Thanks

darwen
February 5th, 2005, 04:10 PM
These figures must be drawn onto a control right ?

Handle the mouse down event on that control. The parameters passed into this event contain the cursor position. Run through the bounding boxes of your figures and check which one has been clicked on.

Straightforward huh ?

Darwen.