09-06-2012, 09:17 AM
09-06-2012, 11:57 PM
وعليكم السلام ورحمة الله
بالتوفيق
كود :
if ColorDialog1.Execute then
Label1.Caption:=ColorToString(ColorDialog1.Color);بالتوفيق
10-06-2012, 06:49 AM
شكرا اخي جزاك الله كل خير لكن هل من طريقة لأظهار الرقم الخاص باللون بصيغة Html ؟
10-06-2012, 06:28 PM
وعليكم السلام اخي
بالتوفيق
PHP كود :
function ColortoHtml(col:Tcolor):String;
var
tmpRGB : TColorRef;
begin
tmpRGB := ColorToRGB(col) ;
Result:=Format('#%.2x%.2x%.2x',
[GetRValue(tmpRGB),
GetGValue(tmpRGB),
GetBValue(tmpRGB)]) ;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if ColorDialog1.Execute then
Label1.Caption:=ColorToHtml(ColorDialog1.Color) ;
end;
بالتوفيق