Click though transparent area of button?

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    2 posts
    Member since:
    Jul 2013

    Posted 06 May Link to this post

    How do I allow the mouse click to pass thorough this control transparent area to any controls behind it?


  2. Hristo Merdjanov
    Hristo Merdjanov avatar
    679 posts

    Posted 09 May Link to this post

    Hello Bryan,

    Thank you for writing.

    Each control is responsible for handling its own events no matter if it is transparent or not. A possible solution would be to create a custom button and override its WndProc method and listen for the WM_NCHITTEST message. Then you can modify it and make your control transparent for all mouse events.

    If you do this you would be able to handle the click event with whatever control lies under your button. Please check the following forum thread discussing a similar scenario:

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Hristo Merdjanov
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft banner
Back to Top