Recently I wanted to create a small little program that could sit=
on the desktop and not block the desktop wallpaper=2E There are=
two methods to accomplish this ( that I am aware of )=2E

1) create a solid color bmp as a background image and set the=
transparency key to match its color
2) specify the form's background color with a matching=
transparency key

Now my issues with both methods, but first it should be known=
that I have set the forms to have no border or title bar and=
have implemented code that allows me to click-and-hold anywhere=
( with exceptions listed below ) on the form and move it=2E The=
data actually displayed on the form is just text and one=
rectangle, all drawn by me ( there are no controls on the form=
itself )=2E

1) I have two issues with this method, although it is what I'm=
prefering to use at the moment=2E The first seems to be the=
discrepancy between how the program is handled when the=
computer's Color Depth is 32bit or when it is less than 32bit (=
16bit )=2E When the color depth is 32bit then I am able to click=
on the entire area the form inhabits ( even that which is=
transparent ) and move it, but if the color depth is less than=
32bit ( 16bit ) then only the drawn text or rectangle outline (=
since it has no fill ) can be clicked to drag the program=
around=2E Clicking on the transparent areas just passes the click=
through the form to whatever is below ( even when I know the=
form has focus )=2E I'd like to be able, regardless of the=
desktop's color depth, to click anywhere within the form area=
and move the application=2E

The second issue I have with this method occurs when I take my=
executable and put it on another PC ( my PC is XP Pro, the other=
PC is XP Home=2E=2E Both SP2 )=2E The problem is similar, but a=
little different=2E When the 2nd PC's color depth is at 32bit,=
the transparency does not work=2E The green/lime ( that's the=
transparent color I'm using ) background shows=2E Needless to say=
this is not acceptable=2E When I change the color depth to less=
than 32bit ( 24bit this time ), the transparency actually works,=
but I come across the same issue of clicks on the transparent=
areas just passing through=2E

2) With this method I have not tried it on a 2nd PC yet ( I don't=
have it available where I am atm )=2E Its basically the same=
"issue" as mentioned above with color depth less than 32bit,=
except it does it with a color depth of 32bit and 16bit=2E Clicks=
on the transparent areas just pass right through=2E I'm tempted=
to just go with this method and possibly make one area on the=
form that is meant to be used to drag it around ( similar to the=
idea of the box that appears to move tables in MS Word ), but=
I'm hoping there's a solution I'm unaware of before I do that=2E

Anyways, all of this brings up some interesting questions=2E

-What does color depth have to do with transparency handling?
-Does the version of XP ( Home or Pro ) handle transparency=
differently?

Probably some more questions also=2E

Not sure if it matters, but I'm doing all of this in C#=2E

So any ideas to get pass any of these issues?

Thanks in advance=2E

--------------------------------
From: othell m=2E

-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)

<Id>HN0Y7xO4H0+DVomkdJq1vA=3D=3D</Id>