Announcement

Collapse
No announcement yet.

Image and events

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Image and events

    Hallo,
    I’m new to programming, to get me moving I’m trying to build a graphic games program ‘Darts’. The program is used for the scores, these can be entered in text boxes (this is easy) or with the mouse over an image(not easy). The problem I have is: I have an image of a darts board, when I place the mouse over a part of the image say over the 20 or double 20, I want to be able to catch this event so it can be subtracted from the over all score. Can anybody tell me how this is done or point me in the direction what I need to read on this subject?
    I’m using MS Visual Studio 2008 and C#.

    Many thanks

    Wayne

  • #2
    Hi,

    for the image-part you have to define regions in the image. These regions represent the fields of the dart board.

    In the image-click event check then match the defined regions with the mouse coordinates.

    A starter to this might be: http://www.codeproject.com/KB/miscct...apcontrol.aspx

    Cheers
    Günther
    "Any fool can write code that a computer can understand. Good programmers write code that humans can understand". - Martin Fowler

    Comment


    • #3
      Images and Events

      Thanks,
      I now have an idea where to start, but I'm sure it will not be the last question!

      Kind regards

      Wayne

      Comment

      Working...
      X