Board index » delphi » Form.Color under 256 color mode.
jrube...@SPAM-B-GONE.mother.com (Neil J. Rubenking)
![]() Delphi Developer |
Fri, 08 Nov 2002 03:00:00 GMT
|
jrube...@SPAM-B-GONE.mother.com (Neil J. Rubenking)
![]() Delphi Developer |
Fri, 08 Nov 2002 03:00:00 GMT
Form.Color under 256 color mode.
In article <8g8q7o$2...@bornews.borland.com>, jamesc...@sympatico.ca
says... Quote> Hi, Be sure to set all labels to Transparent=True. -- |
Earl F. Glyn
![]() Delphi Developer |
Fri, 08 Nov 2002 03:00:00 GMT
Re:Form.Color under 256 color mode.Quote"jameschou" <jamesc...@sympatico.ca> wrote in message Quote> I have a form which I want its background color is $B$D4DE( color of question. Unfortuntely, Deja has messed up their archive (I hope temporarily) and the desired article is not online. I kept an offline copy and will just re-post it here: ======================================================== From: "Roelof Engelbrecht" <roe...@nospam.tca.net> Subject: Re: Non-dithered orange in 256 color mode? Date: 03 Sep 1998 00:00:00 GMT Message-ID: <6snotk$kg62@forums.borland.com> References: <6sfva4$aja2@forums.borland.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.delphi.graphics I was able to answer my own question, based on an article in the July 1998 1. Add the following to the form's FormCreate event handler: {allocate a logical palette} 2. Add the following to the form's FormDestroy event handler: {delete the logical palette} 3. Override form's GetPalette function as follows: function TForm1.GetPalette: HPalette; 4. In the form of component's Paint event handler add: {select palette} {choose orange color from palette} {do drawing here...} {restore previous palette} Works for me! You need to modify this code to add more than a single color Roelof QuoteRoelof Engelbrecht wrote in message <6sfva4$a...@forums.borland.com>... -- Earl F. Glynn E-mail: EarlGl...@att.net efg's Computer Lab: http://www.efg2.com/Lab |
James Cho
![]() Delphi Developer |
Sat, 09 Nov 2002 03:00:00 GMT
Re:Form.Color under 256 color mode.Hi, Thanks for reply, But this still not resolve my problem. What am I doing is not just CreatePalette,SelectPalette, RealizePalette, e.g. In my form, I have 2 panel. I want the color of them should be $00B4D4DE and My best result is: If you assign the color of a panel as $100000000 + So, I wonder if there is some better way to do this? Maybe do some hook at Thansk. James. Earl F. Glynn <EarlGl...@att.net> wrote in message Quote> "jameschou" <jamesc...@sympatico.ca> wrote in message |
1. TImage color problem changing forms in 256 color mode
2. 256 color image in TImage at 256 colors mode goes to 16 color image in 16.7M colors mode?
3. Keeping 16 bits colors in 256 color mode
4. 256 color images in high color mode
5. Color palettes in 256 color modes
6. Keeping 16 bits colors in 256 color mode
7. Dithering 256 colors BMP for 16 colors VGA mode
8. 16 & 256 palletes in 256 color mode
9. extracting 256 color icon from program and saving as 256 color
10. Color properties: how can I use color from custom 256 color palette