delphi TColorDialog

TColorDialog
预览
        

实现过程

 

 

动态创建和使用颜色对话框

function ShowColorDlg:TColor;
begin
  with TColorDialog.Create(nil) do
  begin
     Options :=[cdFullOpen,cdPreventFullOpen,cdShowHelp,cdSolidColor,cdAnyColor];
     if Execute then
        Result:=Color;
  end;
end;

procedure TForm1.btn_ShowColorDlgClick(Sender: TObject);
begin
   ShowColorDlg;
end;

 
 




附件列表

    原文地址:https://www.cnblogs.com/xe2011/p/3372707.html