How to draw inside of a transparent region of a form?

C

Carsten Klotz

Hi,

I've set the TransparencyKey of a form to black. That means, all black
pixel will be shown transparent within the drawing content of that form. If
I set the background to black, I can see the underlying window (ie. Desktop
or IE). But when I want to draw with the mouse inside that transparent
area, my form/window lost its focus (TopMost=true). Even when I'm just
moving the mouse, I can see, that I'm "touching" the underlying content
(i.e. cursor type changes to the type of the underlying application,focuses
buttons, etc.).

Any ideas?

Best regards,

Carsten.
 
G

Guest

Rather than make the entire area transparent... would it work for you to set
the opacity of the form to a lower value?

When it comes to drawing, you are able to draw anywhere you like within the
client area... even in areas that have been made transparent using the same
drawing mechanisms that you would normally use.

Otherwise... I am at a loss. The fact that your mouse is able to click
through is actually by design. The same feature that is causing you this
headache is the same feature that makes making nonrectangular forms a breeze.

Brendan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top