home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 November / CDVD1105.ISO / Software / Freeware / programare / graphics32 / Examples / Vcl / ImgView_Layers_Ex / NewImageUnit.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2004-07-05  |  1.7 KB  |  74 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.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  32.   StdCtrls, ExtCtrls, ComCtrls;
  33.  
  34. type
  35.   TNewImageForm = class(TForm)
  36.     Label1: TLabel;
  37.     ImageWidth: TEdit;
  38.     UpDown1: TUpDown;
  39.     Label2: TLabel;
  40.     ImageHeight: TEdit;
  41.     UpDown2: TUpDown;
  42.     Label3: TLabel;
  43.     Label4: TLabel;
  44.     Label5: TLabel;
  45.     Panel1: TPanel;
  46.     Button1: TButton;
  47.     Button2: TButton;
  48.     Button3: TButton;
  49.     ColorDialog1: TColorDialog;
  50.     procedure Button1Click(Sender: TObject);
  51.   private
  52.     { Private declarations }
  53.   public
  54.     { Public declarations }
  55.   end;
  56.  
  57. var
  58.   NewImageForm: TNewImageForm;
  59.  
  60. implementation
  61.  
  62. {$R *.DFM}
  63.  
  64. procedure TNewImageForm.Button1Click(Sender: TObject);
  65. begin
  66.   with ColorDialog1 do
  67.   begin
  68.     Color := Panel1.Color;
  69.     if Execute then Panel1.Color := Color;
  70.   end;
  71. end;
  72.  
  73. end.
  74.