unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure WMNCHitTest(var M: TWMNCHitTest); message wm_NCHitTest;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.WMNCHitTest(var M: TWMNCHitTest);
begin
inherited;
if M.Result = htClient then
M.Result := htCaption;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
hsWindowRegion: Integer;
begin
hsWindowRegion := CreateEllipticRgn(50, 50, 350, 200);
SetWindowRgn(Handle, hsWindowRegion, true);
end;
end.
Копирайт © 2007, Lanselot. Все права защищены.