Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Having a little trouble with some code I am working on. I have never worked with GDI or GDI+ before so this is a little new to me and I am not sure what I am missing. I am sure it is probably something basic.

 

Found a tutorial at this site . That explains the GDI+ basics. What I am trying to do is make a test program that will make 3 lines on a panel control.... when the mouse is over a line it will change lable1.text to true. Later I would add code that would additionally tell me what line the mouse was over as well.

 

I can get the lines drawn... I think I have the regions set correctly. The tutorial mentions that you can do a hit test by using the Region.IsVisible method. I tried that passing the current mouse coordinates in the panel control to the method to compare but it doesn't seem to detect the hit when passed over a line.

 

Attached is my code... any help is appreciated.

windowsapplication9.zip

"Programmers are tools for converting caffeine into code."

 

Madcow Inventions -- Software for the Sanity Challenged.

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...