Using system colors 
Author Message
 Using system colors

Is this the shortest way to create a pen using a system color? Seems like a
rather verbose way...

Dim pen As New Pen(Color.FromKnownColor(KnownColor.ControlLightLight))

TIA,

Miguel Santos



Sat, 31 May 2003 11:01:42 GMT  
 Using system colors
Dim pen as New Pen(SystemColors.xxxxxx)

Replace xxxxx with item, such as Menu, Border, etc....

It may be SystemColor... I'm not booted up to my .NET partition right now.
--------
Russ


Quote:
> Is this the shortest way to create a pen using a system color? Seems like
a
> rather verbose way...

> Dim pen As New Pen(Color.FromKnownColor(KnownColor.ControlLightLight))

> TIA,

> Miguel Santos



Sat, 31 May 2003 03:06:47 GMT  
 Using system colors
Yep, Dim pen As New Pen(SystemColors.ControlLightLight)

Thanks a bunch, was wasting up all the little space left for the code window
:)

Best Regards,

Miguel Santos



Quote:
> Dim pen as New Pen(SystemColors.xxxxxx)

> Replace xxxxx with item, such as Menu, Border, etc....

> It may be SystemColor... I'm not booted up to my .NET partition right now.
> --------
> Russ



> > Is this the shortest way to create a pen using a system color? Seems
like
> a
> > rather verbose way...

> > Dim pen As New Pen(Color.FromKnownColor(KnownColor.ControlLightLight))

> > TIA,

> > Miguel Santos



Sat, 31 May 2003 17:02:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. using system colors

2. How to set/retrieve Windows System Colors Using API and VBA

3. how can I retrieve the number of colors/bits per pixel used/avaliable by the system

4. Mapping Bitmap Background Colors to System Colors

5. Coversion of System Colors to true colors

6. Getting the palette color of a system color

7. Getting the palette color of a system color

8. Refreshing the system after the system colors have been changed

9. Using a Custom color from the color palette.

10. Using 256 color Palettes in High/True Color

11. Resetting original system colors on quitting application

12. Use system colors on splash screen

 

 
Powered by phpBB® Forum Software