home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 November / CDVD1105.ISO / Software / Freeware / programare / graphics32 / Examples / Clx / ImgView_Layers_Ex / NewImageUnit.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2004-07-13  |  1.7 KB  |  72 lines

  1. unit NewImageUnit;
  2.  
  3. (* ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is Graphics32
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Alex A. Denisov
  20.  *
  21.  * Portions created by the Initial Developer are Copyright (C) 2000-2004
  22.  * the Initial Developer. All Rights Reserved.
  23.  *
  24.  * Contributor(s):
  25.  *
  26.  * ***** END LICENSE BLOCK ***** *)
  27.  
  28. interface
  29.  
  30. uses
  31.   SysUtils, Classes, QForms, QDialogs, QStdCtrls, QControls, QExtCtrls,
  32.   QComCtrls;
  33.  
  34. type
  35.   TNewImageForm = class(TForm)
  36.     Label1: TLabel;
  37.     Label2: TLabel;
  38.     Label3: TLabel;
  39.     Label4: TLabel;
  40.     Label5: TLabel;
  41.     Panel1: TPanel;
  42.     Button1: TButton;
  43.     Button2: TButton;
  44.     Button3: TButton;
  45.     ImageWidth: TEdit;
  46.     ImageHeight: TEdit;
  47.     ColorDialog1: TColorDialog;
  48.     procedure Button1Click(Sender: TObject);
  49.   private
  50.     { Private declarations }
  51.   public
  52.     { Public declarations }
  53.   end;
  54.  
  55. var
  56.   NewImageForm: TNewImageForm;
  57.  
  58. implementation
  59.  
  60. {$R *.xfm}
  61.  
  62. procedure TNewImageForm.Button1Click(Sender: TObject);
  63. begin
  64.   with ColorDialog1 do
  65.   begin
  66.     Color := Panel1.Color;
  67.     if Execute then Panel1.Color := Color;
  68.   end;
  69. end;
  70.  
  71. end.
  72.