Click here to Skip to main content
15,867,975 members
Home / Discussions / C#
   

C#

 
QuestionHow to use PING utility in my program Pin
HAHAHA_NEXT8-Jan-04 8:34
HAHAHA_NEXT8-Jan-04 8:34 
AnswerRe: How to use PING utility in my program Pin
Kentamanos8-Jan-04 9:18
Kentamanos8-Jan-04 9:18 
GeneralGDI grab handles and mouse move Pin
Miles Roberts8-Jan-04 7:10
Miles Roberts8-Jan-04 7:10 
GeneralRe: GDI grab handles and mouse move Pin
Heath Stewart8-Jan-04 7:36
protectorHeath Stewart8-Jan-04 7:36 
GeneralRe: GDI grab handles and mouse move Pin
leppie8-Jan-04 8:13
leppie8-Jan-04 8:13 
GeneralDO NOT HELP THIS PERSON WITH HIS HOMEWORK! Pin
leppie8-Jan-04 9:47
leppie8-Jan-04 9:47 
GeneralNon-rectangular Windows :: the 24-bit issue [advanced] Pin
nibmike8-Jan-04 7:07
nibmike8-Jan-04 7:07 
GeneralRe: Non-rectangular Windows :: the 24-bit issue [advanced] Pin
Heath Stewart8-Jan-04 7:29
protectorHeath Stewart8-Jan-04 7:29 
Windows Layers. See SetLayeredWindowsAttributes in the Platform SDK at http://msdn.microsoft.com/library[^].

Odd. Both the Form.TransparencyKey and Form.Opacity use Windows Layers (see SetLayeredWindowsAttributes in the Platform SDK at http://msdn.microsoft.com/library[^]) with either the LWA_COLORKEY or LWA_ALPHA flag, respectively. For transparency keys, a COLORREF is used, which is a typedef for a DWORD, a 32-bit unsigned integer. The COLORREF documentation states that the high-order byte must be zero (the normal alpha byte) but as long as it is zero, I don't see why a graphics card in 32-bit mode would cause problems. Perhaps driver problems?

In any case, you can use the old way: window regions. You must override painting (override OnPaint in your form) and set the Graphic.Clip property to a region (use GraphicsPath to create an odd region) that determines which region is valid for painting. Everything else is not painted and, hence, shows what's behind it. This was really the only way to do it before Window Layers, which is only supported in Windows 2000 and higher.

The thing that puzzles me is that Windows Media Player skins use a color mask. Logically, that color would be the transparency color used with Windows Layers. Perhaps they are only using that color to designate a clipped region.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Non-rectangular Windows :: the 24-bit issue [advanced] Pin
leppie8-Jan-04 8:17
leppie8-Jan-04 8:17 
GeneralGenerating strings that are matched by a regex Pin
bnieland8-Jan-04 6:34
bnieland8-Jan-04 6:34 
GeneralRe: Generating strings that are matched by a regex Pin
Kentamanos8-Jan-04 6:58
Kentamanos8-Jan-04 6:58 
GeneralRe: Generating strings that are matched by a regex Pin
leppie8-Jan-04 7:04
leppie8-Jan-04 7:04 
GeneralRe: Generating strings that are matched by a regex Pin
bnieland8-Jan-04 7:25
bnieland8-Jan-04 7:25 
GeneralMicrosoft Animation Control Pin
obelisk298-Jan-04 4:13
obelisk298-Jan-04 4:13 
GeneralRe: Microsoft Animation Control Pin
Niels Penneman8-Jan-04 6:19
Niels Penneman8-Jan-04 6:19 
GeneralRe: Microsoft Animation Control Pin
Heath Stewart8-Jan-04 6:23
protectorHeath Stewart8-Jan-04 6:23 
GeneralRe: Microsoft Animation Control Pin
obelisk298-Jan-04 10:45
obelisk298-Jan-04 10:45 
GeneralInheriting from DirectX problem ! Pin
pahluwalia8-Jan-04 2:49
pahluwalia8-Jan-04 2:49 
GeneralRe: Inheriting from DirectX problem ! Pin
obelisk298-Jan-04 4:17
obelisk298-Jan-04 4:17 
GeneralRe: Inheriting from DirectX problem ! Pin
pahluwalia8-Jan-04 5:51
pahluwalia8-Jan-04 5:51 
GeneralRe: Inheriting from DirectX problem ! Pin
Kentamanos8-Jan-04 5:52
Kentamanos8-Jan-04 5:52 
GeneralRe: Inheriting from DirectX problem ! Pin
leppie8-Jan-04 6:13
leppie8-Jan-04 6:13 
GeneralRe: Inheriting from DirectX problem ! Pin
Heath Stewart8-Jan-04 6:14
protectorHeath Stewart8-Jan-04 6:14 
GeneralRe: Inheriting from DirectX problem ! Pin
Kentamanos8-Jan-04 6:24
Kentamanos8-Jan-04 6:24 
GeneralRe: Inheriting from DirectX problem ! Pin
leppie8-Jan-04 7:33
leppie8-Jan-04 7:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.