views:

300

answers:

1

I have a problem, a bit related to: http://stackoverflow.com/questions/855826/c-winforms-transparent-control-allowing-clickthrough

Contrary to him i would like to capture mouseevents on my program, while still retaining a "window" to whats behind my program. color.transparent doesnt work, and transparencykey just delivers mouse events to whatever is underneath. Using a panel with transparent backcolor or with a backcolor equal to transparencykey does not give the desired effect.

Plz help me :)

A: 

If you need to capture the mouse events, and that's include the MouseClick, then simply use transparency, but don't set it to 0 set it to 1.

It will be transparent enough to see through, but because it's non-zero the mouse events will be processed the the front-most window.

Paulo Santos