home *** CD-ROM | disk | FTP | other *** search
/ Delphi 4 Bible / Delphi_4_Bible_Tom_Swan_IDG_Books_1998.iso / source / COLORDLG / MAIN.PAS < prev    next >
Pascal/Delphi Source File  |  1998-04-04  |  626b  |  35 lines

  1. unit Main;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, SysUtils, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, ColorDlg, Buttons, StdCtrls;
  8.  
  9. type
  10.   TMainForm = class(TForm)
  11.     CloseBitBtn: TBitBtn;
  12.     TestBitBtn: TBitBtn;
  13.     procedure TestBitBtnClick(Sender: TObject);
  14.   private
  15.     { Private declarations }
  16.   public
  17.     { Public declarations }
  18.   end;
  19.  
  20. var
  21.   MainForm: TMainForm;
  22.  
  23. implementation
  24.  
  25. {$R *.DFM}
  26.  
  27. procedure TMainForm.TestBitBtnClick(Sender: TObject);
  28. begin
  29.   with ColorDlgForm do
  30.   if ShowModal = mrOk then
  31.     ShowMessage(Format('Color value = $%-.6x', [ColorResult]));
  32. end;
  33.  
  34. end.
  35.