[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.drawing

ThemeUI DrawThemeParentBackground

Allan McLemore

11/19/2004 2:18:00 PM

Hi there,

I recently asked a question in the VB.NET newsgroup about resolving an
issue related to using the ThemeUI. If you draw a theme part without
calling DrawThemeParentBackground first you end up with a black border.

Now I am making a class that loads msstyles files and draws everything
manually. But unfortunately I'm getting a similar border around my theme
parts because I can't call this function, but what I really need to know is
"has anyone got a clue what this actually does?".

I was first thinking that maybe it takes the top left pixel of the parts
bitmap and uses that as an alpha key to remove unwanted pixels, but I can't
see that this is so because of the colour of the top left pixel, it seems to
be a shadow. I'm kind of presuming that this performs some kind of alpha
function but not sure what.

I've attached a bitmap which contains 5 theme parts for a push button.
If you look at the top left of each part you will see some kind of shadow,
I presume this is wanted in the final result but I think it needs to be
alpha blended as each part needs to match the background. Anyway if anyone
has any suggestions or ideas I would be most appreciative!

Nick.


1 Answer

William Main

1/12/2005 11:47:00 PM

0

I was getting this error when I used a stream to get an image. If I closed
the stream and then tried to save that image I get the error. If I leave the
stream open then it is ok. The KB article 814675 talks about this.

http://support.microsoft.com/...

William Main

"Nak" <a@a.com> wrote in message
news:OnvPeKkzEHA.2016@TK2MSFTNGP15.phx.gbl...
> Hi there,
>
> I recently asked a question in the VB.NET newsgroup about resolving an
> issue related to using the ThemeUI. If you draw a theme part without
> calling DrawThemeParentBackground first you end up with a black border.
>
> Now I am making a class that loads msstyles files and draws everything
> manually. But unfortunately I'm getting a similar border around my theme
> parts because I can't call this function, but what I really need to know
> is "has anyone got a clue what this actually does?".
>
> I was first thinking that maybe it takes the top left pixel of the
> parts bitmap and uses that as an alpha key to remove unwanted pixels, but
> I can't see that this is so because of the colour of the top left pixel,
> it seems to be a shadow. I'm kind of presuming that this performs some
> kind of alpha function but not sure what.
>
> I've attached a bitmap which contains 5 theme parts for a push button.
> If you look at the top left of each part you will see some kind of shadow,
> I presume this is wanted in the final result but I think it needs to be
> alpha blended as each part needs to match the background. Anyway if
> anyone has any suggestions or ideas I would be most appreciative!
>
> Nick.
>