Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

Image Click Event

I have some image controls with pictures in it that have transparent edges.  This makes the picture to appear to be a different shape then a rectangle.  I would like the image click event to only run if the part that is not transparent is clicked, or the click event can run but i would like to be able to have it so it only does a certain part of code if it was clicked on the part that is not transparent.
1 Solution
One thing you could try is too pictures, the one the users see,and one for your reference, but the one for you is two colors any two not important lets black and white. First the two pictures should be overlapping, so you have the one they see and your invisible black and white one, your black and white one should be all black except where the other is transparent, there its white. then when they click the transparent you check if the x y lets say 4,10 is black or white on the other picture box if its white then ignore it otherwise you can continue, because it was not a transparent spot.
This question has already been answered.


It's got a VB solution in there as well.

Hi dawgmaster,
This old question (QID 20560446) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now