Making a dental program in VB.NET

Discussion in 'OT Technology' started by dataset, Mar 30, 2009.

  1. dataset

    dataset New Member

    Joined:
    Feb 4, 2009
    Messages:
    790
    Likes Received:
    0
    Let's say I have this picture:

    [​IMG]

    I want to import that image into VB.NET and when I click any tooth, it will give me a message box corresponding to that tooth. How can I do something like that?
     
  2. Limp_Brisket

    Limp_Brisket New Member

    Joined:
    Jan 2, 2006
    Messages:
    48,422
    Likes Received:
    0
    Location:
    Utah
    i don't know much about vb.net but i imagine you could put an image on your form and then have a click event which uses the current mouse coordinates to determine which tooth they clicked on and do the appropriate action :dunno:
     
  3. dataset

    dataset New Member

    Joined:
    Feb 4, 2009
    Messages:
    790
    Likes Received:
    0
    Was hoping to actually map something along each tooth which would have it's own click event :hs:
     
  4. DeathClock

    DeathClock Guest

    I would define rough rectangular areas that enclose each tooth, then on handling the click event check to see if the mouse is in any of those areas and call a separate function for each tooth. Pretty simple really.
     
  5. ge0

    ge0 New Member

    Joined:
    Oct 31, 2005
    Messages:
    8,398
    Likes Received:
    0
    Location:
    JERSEY
    MINUS WHALE make it an imagemap
     
  6. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    You can make "transparent" buttons on each tooth.
     
  7. Limp_Brisket

    Limp_Brisket New Member

    Joined:
    Jan 2, 2006
    Messages:
    48,422
    Likes Received:
    0
    Location:
    Utah
    this is probably a better vb.net "solution" :mamoru:
     
  8. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    I like the imagemap better. That way the hotspots will be the shapes of the teeth, not just squares.
     
  9. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    True - far too much effort for what it's worth IMHO tho.
     
  10. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    It's not any effort at all. That's a black/white image, so fill the background with one color, like dark grey, then erase all the black, then use a fill tool to dump a different color into each tooth space. Load both images into VB and program the tooth map's click event to find out which color is in the same spot on the image map. Takes 20 minutes tops.

    Don't underestimate the value of a good user interface.
     

Share This Page