CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Oct 2009

    Red face Clickable area that is transparent/colourless

    I've search for hours on Google but could find a solution.

    I want a clickable area (that can handle MouseClickEvent, DoubleClickEvent, etc...) that is transparent, hence you can look through it.
    For example:
    I have Form1 with a bunch of buttons, text fields, etc. I want a clickable area that is over the whole Form1 (thus over all the buttons, etc).
    If you click this area, the clickEvent for this area should be could and not the eg: button underneath this area.
    Most importantly of all the area must be transparent, thus all the buttons, textfields, etc underneath the clickable area should be visible.
    Something like a panel or pictureBox that you could put over the buttons would be fine, but a if you drag a panel/pictureBox over a button, the button is invisible, and if you say send to back, the event of the button will be called and not that of the clickable area.

    I've attached an image as example.
    I want the blue area (in this case a picture box) over ALL the buttons and textboxes, so that if you click this blue area a function should be called. This area should actually not be blue, but transparent/colourless, so that you can see the buttons underneath. If I say send the picturebox behind the buttons, then when I click on a button, the button's function is called and not the picture box's function as I want it.

    It is impossible for me to change all the event handlers of the buttons/textboxes etc, because I also use components that don't have the necessary event handlers that I want. So this is the only possible method I can think of.

    Thank you for any help or suggestions.
    Attached Images Attached Images  

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

By using this site, you agree to the Privacy Policy