unit Unit4;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  TFlatButtonUnit, ExtCtrls, TFlatPanelUnit, TFlatHintUnit,
  BUFormAnimation, StdCtrls, TFlatMemoUnit, TFlatEditUnit,
  TFlatComboBoxUnit, PgWhois;

type
  TForm4 = class(TForm)
    FlatHint1: TFlatHint;
    FlatPanel1: TFlatPanel;
    FlatButton1: TFlatButton;
    FlatButton2: TFlatButton;
    FlatPanel2: TFlatPanel;
    PgWhois1: TPgWhois;
    Label1: TLabel;
    Label2: TLabel;
    ComboBox1: TFlatComboBox;
    Edit1: TFlatEdit;
    btnWhois: TFlatButton;
    btnClear: TFlatButton;
    Memo1: TFlatMemo;
    BUFormAnimation4: TBUFormAnimation;
    procedure FlatPanel1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure FlatButton2Click(Sender: TObject);
    procedure FlatButton1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure btnClearClick(Sender: TObject);
    procedure btnWhoisClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form4: TForm4;

implementation

{$R *.DFM}

procedure TForm4.FlatPanel1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
 ReleaseCapture;
 Perform(WM_NCLBUTTONDOWN,HTCAPTION,0);

end;

procedure TForm4.FlatButton2Click(Sender: TObject);
begin
Form4.WindowState:=wsMinimized;
end;

procedure TForm4.FlatButton1Click(Sender: TObject);
begin
Form4.close;
end;

procedure TForm4.FormActivate(Sender: TObject);
begin
BUFormAnimation4.AppearRectangle;
end;

procedure TForm4.btnClearClick(Sender: TObject);
begin
Memo1.clear;
end;

procedure TForm4.btnWhoisClick(Sender: TObject);
Var
  TempS : String;
begin
  TempS := ComboBox1.Text;
  IF Trim(TempS) = '' Then
  Begin
    Memo1.lines.add('Please specify server name.');
    Exit;
  End;
  PgWhois1.HostName  := TempS;
  TempS := Edit1.Text;
  IF Trim(TempS) = '' Then
  Begin
    Memo1.lines.Add('Please specify Domain name.');
    Exit;
  End;
  PgWhois1.Request   := Edit1.Text;
  Memo1.Lines.Text := PgWhois1.Whois;

End;

end.
