unit UMove;

interface

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

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Panel1: TPanel;
    RichEdit1: TRichEdit;
    Edit1: TEdit;
    GroupBox1: TGroupBox;
    Button1: TButton;
    Button2: TButton;
    ListBox1: TListBox;
    Image1: TImage;
    procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
 if (ssAlt in Shift)
 then begin
   ReleaseCapture();
   (Sender as TControl).Perform(WM_SYSCOMMAND, $F012, 0);
 end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
 SendMessage(Handle,WM_SYSCOMMAND,SC_SCREENSAVE,0);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
 SendMessage(Handle,WM_SYSCOMMAND,SC_TASKLIST,0);
end;

end.
