unit Zastavka;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, jpeg, ExtCtrls;

type
  TForm18 = class(TForm)
    Image1: TImage;
    SpeedButton1: TSpeedButton;
    Label1: TLabel;
    procedure FormDockDrop(Sender: TObject; Source: TDragDockObject; X,
      Y: Integer);
    procedure FormDragOver(Sender, Source: TObject; X, Y: Integer;
      State: TDragState; var Accept: Boolean);
    procedure SpeedButton1Click(Sender: TObject);
  private
     procedure CreateParams(var Params: TCreateParams); override;
    { Private declarations }
  public
    procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;
    { Public declarations }
  end;

var
  Form18: TForm18;

implementation

uses Menu1;

{$R *.dfm}

procedure TForm18.CreateParams(var Params: TCreateParams);
begin
  inherited createparams(params);
  {Здесь убираем у формы заголовки и границы}
  params.style:=params.style or ws_popup xor ws_dlgframe;
end;

procedure TForm18.WMNCHitTest(var Message: TWMNCHitTest);
begin
//   inherited;
//   if Message.Result= htClient then
//      Message.Result:= htCaption;
end;

procedure TForm18.SpeedButton1Click(Sender: TObject);
begin
Form1.Show;
end;

procedure TForm18.FormDragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);
begin
Accept := True;
end;

procedure TForm18.FormDockDrop(Sender: TObject; Source: TDragDockObject; X,
  Y: Integer);
begin
Form18.Left := X;
Form18.Top := Y;
end;

end.
