How can I pass events through a form in XP...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an app that in 2K will allow a user to click on an application that is
running below the current application by simply defining a bitmap with a
transparent section.

HOWEVER in XP the transparent area "blocks" or "recognizes" the click event.
Is there any way to have the event pass through in XP? Is this a setting
issue?

I have managed to define a form with an empty section via regions, but I
need to have some of the inside of this form visible and simply difining a
region that is eliptical isn't enough. The image also changes every second
and the new transparent regions need to be able to pass the events through.

A satisfactory answer might be to create a complex region using the none
white sections of an existing bitmap as a mask, but I can't quite get my mind
around how I would do that.. (any clues appreciated)

TIA


Rob
 
Hello rob,

Try creating a bitmap for the form that will sit above like this:
- the places that you want to be transparent, make them a certain color
- the other, another color.

Load the bitmap into the form, and set its TransparencyKey to the color you
used for the transparent regions.

This will enable .NET to create that complicated region.

For more information please read
http://msdn.microsoft.com/library/d...WindowsFormsFormClassTransparencyKeyTopic.asp

and go from there.

Alex.
 
Alex, I got excited...but
as per atricle


Windows 2000 Platform Note: Transparent windows and regions are only
supported under the Windows 2000 operating system.

What I have that works in 2K and NT4 :) but crashes in XP is a routine that
evaluates every Pixle in an 800 X 800 image and if the pixel <> the
transparency color then it builds a graphicspath which is then set to the
forms.region

However as I am sure you could appreciate this is very costly and on my
Laptop takes the cpu to 100%. (1.6 gig with .5 gig of ram)

What I would like to know is if there is another way to get this to work on
XP.

The transparent image doesn't work, building a complex graphics path does,
but doing it pixel by pixel is disgustingly expensive.

HELP!


Rob

PS Isn't there just some XP style argument that would enable this? or maybe
a property?
 
Back
Top