Drawing & Line Selection

paris_tj

Member
Joined
Mar 2, 2010
Messages
7
Programming Experience
Beginner
Ok, I am trying to make a simple application and I need some assistance.

For example.
I need to be able hold left mouse button down and it starts and line, and the line ends at the point where i release the mouse button. I have this working fine.

My problem is now that I have them drawn I need to make it when I mouse over a specific line (not all of them) it changes the line color to RED. If I click on a specific line I can enter some properties into a box. Example would be Wire Type, Length, Color, etc.

Any help would be great.
 
GDI+ drawing doesn't actually create any objects, so there are no specific events you can handle. Basically, what you have to do is handle events of the control you're drawing on and then determine where the mouse is in relation to your drawing. You can then take action based on that. Follow the Blog link in my signature and check out my thread on manipulating GDI+ drawings.
 

Latest posts

Back
Top