Search results for 'TColor'. 2 post(s) found.
- 2007/09/11 TColor to HTML color
- 2007/09/11 Convert TColor to Hex & Hex to TColor
Put a TColorDialog (ColorDialog1), a TLabel (Label1) and a TButton (Button1) in your form, and assign the Button1.OnClick procedure as follows:
function ColorToHtml(DColor:TColor):string;
var
tmpRGB : TColorRef;
begin
tmpRGB := ColorToRGB(DColor) ;
Result:=Format('#%.2x%.2x%.2x',
[GetRValue(tmpRGB),
GetGValue(tmpRGB),
GetBValue(tmpRGB)]) ;
end; {function ColorToHtml}
begin
if ColorDialog1.Execute then
Label1.Caption:=ColorToHtml(ColorDialog1.Color) ;
end;
Another posts included in "Delphi"
| TDesktopCanvas - draw on Windows Desktop (0) | 2007/09/11 |
| TImage.Bitmap fade out (0) | 2007/09/11 |
| Rotate Bitmap (any angle, any center of rotation) (0) | 2007/09/11 |
| Show *any* graphics as Glyph on a SpeedButton (0) | 2007/09/11 |
| Rotating Text (0) | 2007/09/11 |
| Paint a Form with a tiled bitmap image (0) | 2007/09/11 |
| Is Point in Polygon? (0) | 2007/09/11 |
| Implementing a lasso drawing technique (0) | 2007/09/11 |
Trackback : Cannot send a trackbact to this post.
-
Subject Free animal sex pictures free.
2009/02/11 16:10
Animal sex with girls. Gay animal sex. Animal sex movies. Free animal sex videos. Animal sex videos. Animal sex pics. Free animal sex. Animal sex chat. Animal sex.
-
Subject Lipitor.
2009/03/07 08:17
Generic lipitor. Lipitor effects gall bladder. Benefits of lipitor. Can aspirin be taken with lipitor and metfromin. Lipitor.
-
Subject Valtrex side effects.
2009/04/03 18:11
Valtrex no prescrition. Side effects of valtrex.
-
Subject Codeine.
2009/04/24 10:06
Extract codeine. Codeine. Codeine phosphate.
-
Subject Codeine.
2009/05/03 21:03
Apap codeine. 222 isolate codeine. Extract codeine. Acetaminophen-codeine 3. Codeine.
-
Subject Buy tramadol.
2009/05/27 08:51
Tramadol hcl. Tramadol. Tramadol no rx 180 pills.
-
Subject Valium prescription online.
2009/06/01 06:55
Side effects of valium. Valium.
-
Subject Buy xanax online.
2009/06/17 08:01
Half-life of xanax. Xanax addiction. Xanax.
-
Subject Valium canada.
2009/06/17 15:08
Valium cash on delivery. What is valium used for. Valium no prescription. Valium metabolism. What does valium look like. Valium liquid form. Valium.
-
Subject different money making ideas
2010/01/29 05:19
moneyideas
-
Subject different money making ideas
2010/01/29 14:04
moneyideas
-
Subject different money making ideas
2010/01/31 16:39
moneyideas
Here are two simple functions to convert color values from TColor to Hex (HTML) and vice versa:
begin
Result :=
IntToHex(GetRValue(Color), 2) +
IntToHex(GetGValue(Color), 2) +
IntToHex(GetBValue(Color), 2) ;
end;
function HexToTColor(sColor : string) : TColor;
begin
Result :=
RGB(
StrToInt('$'+Copy(sColor, 1, 2)),
StrToInt('$'+Copy(sColor, 3, 2)),
StrToInt('$'+Copy(sColor, 5, 2))
) ;
end;
Another posts included in "Delphi"
| Cut a rectangle from an Image to Clipboard (0) | 2007/09/11 |
| How to capture Windows Desktop to Bitmap (0) | 2007/09/11 |
| How to Convert Pixels to Millimeters (0) | 2007/09/11 |
| Convert a BMP to a JPG (0) | 2007/09/11 |
| Reading a directory content (0) | 2007/09/10 |
| Path shortener: c:\AB\C...DE\F.ghi (0) | 2007/09/10 |
| How to Split and Merge Files (0) | 2007/09/10 |
| Get File 'Last Modified' attribute (0) | 2007/09/10 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 05:43
moneyideas
-
Subject different money making ideas
2010/01/29 14:11
moneyideas
-
Subject different money making ideas
2010/01/31 16:39
moneyideas

Prev

Rss Feed