unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
protected
procedure WndProc(var Message: TMessage); override;
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
SetWindowLong(Form2.Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) or WS_DISABLED);
SetWindowPos(Form2.Handle, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE
or SWP_SHOWWINDOW or SWP_NOACTIVATE);
Show;
end;
procedure TForm1.WndProc(var Message: TMessage);
begin
with Message do
case Msg of
WM_MOUSEFIRST..WM_MOUSELAST: SendMessage(Form2.Handle, Msg, WParam, LParam);
else inherited;
end;
end;
end.