sábado, 5 de setembro de 2009

Movendo um formulário em todas as partes

Unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Label1: TLabel;
private
{ Private declarations }
public
procedure WMNChitTest(var M: TWMNchitTest);
message WM_NCHITTEST;
{ 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;
end.

Nenhum comentário:

Postar um comentário