unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
MainMenu1: TMainMenu;
File1: TMenuItem;
Nwe1: TMenuItem;
private
{ Private declarations }
protected
procedure wmsize(var Message: TMessage);
message WM_SIZE;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.wmsize(var Message: TMessage);
var
w, h: Integer;
begin
//inherited;
w := ClientWidth - (Button1.Left + Button1.Width);
h := ClientHeight - (Button1.Top + Button1.Height);
SetWindowPos(ClientHandle, 0, Button1.Left + Button1.Width,
Button1.Top + Button1.Height, w, h,
SWP_NOZORDER);
end;
end.