home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 21 / CTROM21B.mdf / win95 / zakelijk / esbcalc / setup.exe / file0009.bin / demo1 / MAIN.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1999-03-04  |  1.2 KB  |  55 lines

  1. unit Main;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, CaptBtn, Dialogs, StdCtrls, ShellAPI;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     CaptionButton2: TCaptionButton;
  12.     CaptionButton1: TCaptionButton;
  13.     Label1: TLabel;
  14.     Label2: TLabel;
  15.     Label3: TLabel;
  16.     Label4: TLabel;
  17.     ColorDialog: TColorDialog;
  18.     procedure CaptionButtonClick(Sender: TObject);
  19.     procedure CaptionButton1Click(Sender: TObject);
  20.     procedure CaptionButton2Click(Sender: TObject);
  21.   private
  22.   public
  23.   end;
  24.  
  25. var
  26.   Form1: TForm1;
  27.  
  28. implementation
  29.  
  30. {$R *.DFM}
  31.  
  32. procedure TForm1.CaptionButtonClick(Sender: TObject);
  33. begin
  34.   MessageDlg('Click',mterror,[mbok],0);
  35. end;
  36.  
  37. procedure TForm1.CaptionButton1Click(Sender: TObject);
  38. begin
  39.   ColorDialog.Color := Label1.Font.Color;
  40.   if ColorDialog.Execute then
  41.    begin
  42.     Label1.Font.Color := ColorDialog.Color;
  43.     Label2.Font.Color := ColorDialog.Color;
  44.     Label3.Font.Color := ColorDialog.Color;
  45.    end;
  46. end;
  47.  
  48. procedure TForm1.CaptionButton2Click(Sender: TObject);
  49. begin
  50.   ShellExecute(GetDesktopWindow, 'open', 'mailto:xacker@phreaker.net?subject=Caption Button',
  51.                nil, nil, sw_ShowNormal);
  52. end;
  53.  
  54. end.
  55.