[c#] Transparency key werkt niet in 32-bit

Pagina: 1
Acties:

  • sig69
  • Registratie: Mei 2002
  • Laatst online: 18:36
Ik ben een beetje aan het spelen met manieren om een windows form er een beetje leuker uit te laten zien, ipv de gebruikelijke grijze rechthoek. Ik kwam daarbij dit artikel tegen. Maar, zoals in het artikel werkt het niet goed als schermen op een kleurdiepte hoger dan 16 staan. Ik kan hier echter geen fix of workaround of wat dan ook voor vinden. Weet iemand hier of er andere mogelijkheden zijn?

Edit: vergeet ik erbij te zeggen dat als ik de transparency key op wit of zwart zet, deze kleuren wel transparant zijn in de titelbalk van de applicatie, maar de witte of zwarte achtergrond van m'n background image niet...

[ Voor 19% gewijzigd door sig69 op 27-10-2004 13:49 ]

Roomba E5 te koop


Verwijderd

Ik denk wel een antwoord heb voor je vraag, of je er blij van wordt is ten tweede:

"16-Bit RGB
If you program, you know 16 bits makes up two bytes. There are three major 16-bit formats used: R5G6B5, R5G5B5A1, and R5G5B5X1. Before you run away screaming, take a moment and look at the names. Figure them out? The channel is given a letter (R - Red, G - Green, B - Blue, and A - Alpha), and following the name is the number of bits that represent it. When R5G5B5A1 is used, the red, green, and blue channels are represented with five bits, and alpha is represented with one, meaning it has a maximum of two values (transparent or opaque). The last one, R5G5B5X1 is the same as the previous, but the X1 (which used to be A1) is disreguarded totally, meaning the value is irrelevent when drawing the color. The first one simply leaves out the last channel and gives an extra bit to green. Why? Who knows. ""

Bij sommige mappings, word A(lpha) niet gebruikt.. ik denk dat dit hier het geval is.
dus kan je geen Alpha gebruiken :'(

Heb het zelf al eens eerder gehad, lijkt me niet op te lossen.

code:
1
2
3
4
5
6
7
8
9
Format16bppArgb1555: The pixel format is 16 bits per pixel. The color information specifies 32,768 shades of color, of which 5 bits are red, 5 bits are green, 5 bits are blue, and [b]1 bit is alpha[/b].
 
Format16bppGrayScale: The pixel format is 16 bits per pixel. The color information specifies 65536 shades of gray.
 
Format16bppRgb555: 
Specifies that the format is 16 bits per pixel; 5 bits each are used for the red, green, and blue components. [b]The remaining bit is not used[/b]. 

Format16bppRgb565: 
Specifies that the format is 16 bits per pixel; 5 bits are used for the red component, 6 bits are used for the green component, and 5 bits are used for the blue component. [b]no alpha[/b]


http://msdn.microsoft.com...pixelformatclasstopic.asp

^^ De door .NET gebruikte pixelformaten

[ Voor 33% gewijzigd door Verwijderd op 27-10-2004 14:22 ]


  • sig69
  • Registratie: Mei 2002
  • Laatst online: 18:36
Maar als ik dan de bijvoorbeeld de skins van media player bekijk? Die app is ook niet rechthoekig en doet het altijd goed in 32 bit. Hoe is dat gedaan dan? Wat ik ook vreemd vind is dat de titelbalk wel tranparant is...

Roomba E5 te koop


Verwijderd

Stel is het opacity van een form in op 50% en?

  • pjvandesande
  • Registratie: Maart 2004
  • Laatst online: 14:59

pjvandesande

GC.Collect(head);

In VB6 maakten ik altijd gebruik van custom-shape forms. Ik zou is even kijken, verder had ik in C# dit ook is gemaakt.

Is kijken of ik dat vanavond nog kan opvissen.

  • sig69
  • Registratie: Mei 2002
  • Laatst online: 18:36
Verwijderd schreef op 27 oktober 2004 @ 14:26:
Stel is het opacity van een form in op 50% en?
Als ik dat doe wordt m'n hele form halftransparant.

Roomba E5 te koop


Verwijderd

Schijnen nog al wat problemen te zijn met dat color-keyen

http://gotdotnet.com/comm...ard/Thread.aspx?id=267506
Pagina: 1