all groups > dotnet compact framework > may 2006 >
You're in the

dotnet compact framework

group:

Custom transparency not working on Win CE device


Custom transparency not working on Win CE device Enemaerke
5/31/2006 9:18:11 AM
dotnet compact framework:
Hi everybody

Have a kind of strange behavior that I'm hoping someone can help me
with.

We are developing a custom application using .NET CF (2.0) to a Win CE
(which we are also responsible for constructing from the ground up so
to speak). Since the Win CE image is not done yet we hav started the
devlopment on Pocket PCs just to be able to get going. Our issue is
this; in our UI we use transparency (by means of the ImageAttributes
and the DrawImage overload) which work fine on the PocketPCs but when
the same code is run on the .NET CF on the Win CE image the
transparency just does not work! That is, the images that are drawn as
transparent on the PocketPC are not transparent when draw on the WinCE
image.

We may be missing something totally here, but could any of you guys
give us a hint to what we are missing? Have we created the Win CE image
incorrectly, do we need to include some specific packages in Platform
Builder for the transparency to work, should we be looking for stuff on
the OS or is it the .NET installation that's the problem (we don't know
if DrawImage maps to some native code thats incorrect or if its the
implementation of the .NET thats the problem...

Any help would be much appreciated
RE: Custom transparency not working on Win CE device Alex Yakhnin [MVP]
5/31/2006 11:38:02 AM
What are you using as a transparent color for the ImageAttributes ?

--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com | www.opennetcf.org


[quoted text, click to view]
Re: Custom transparency not working on Win CE device Enemaerke
6/1/2006 12:51:07 AM
I peak at pixel 0,0 and use that color as transparent, so I'm actually
not sure. I'm using transparent png-files so whatever color(or lack
thereof) is at 0,0 is the one I'm using.

Does it make a difference what color is used for the ColorKey? Should I
avoid transparent png images and fill in the transparent background
with some known color instead?

Even so, it still weirds me out why the stuff is working on the
PocketPC but not on the Win CE image

[quoted text, click to view]
Re: Custom transparency not working on Win CE device Alex Yakhnin [MVP]
6/1/2006 5:58:01 AM
Yeah... I think the problem is somewere here. Try to fill it with some color
and see if it fixes your problem.
--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com | www.opennetcf.org


[quoted text, click to view]
Re: Custom transparency not working on Win CE device Enemaerke
6/2/2006 4:43:04 AM
Yep, that was the trick, replacing the transparent background with some
other color made the ImageAttributes and DrawImage behave...thanks Alex

Alex skrev:

[quoted text, click to view]
AddThis Social Bookmark Button