I have created a windows application control in C#.net to show some objects in graphical mode.
To do so I created a rectangles depend on number of items I got in list and plot it over control by using Control OnPaint event.
Now I want to highlight that rectangle if mouse hovering on it.
Please check attached image for more clarity & suggest me how can I achieve it .

Did you check the classical DrawCli example? It shows how a basic application should manage objects and tools.
In short you should re-enumerate your list inside
MouseMoveevent, get the item’s rect and set itsIsFocusedproperty to true if mouse pointer is inside that rect. Then redraw if something changed. You may even do that inside yourOnPaint(check current mouse position) but then you have to always redraw everything insideMouseMove(and it’s a very bad idea).Kind of pseudo-code to explain what I mean:
GraphicalObjectis the base type for all objects you can put on the screen.Objectsis a property that contains the collection of them (GraphicalObjectCollection, for example). Now you code may be like this (note that this is far aways from true code, it’s just an example of a general technique):