Handle is a property of all descendants of TWinControl.If you want to Create your own Handle (WinAPI - CreateWindow(...)) then your code is platformspecific.
how to make it on lazarus??hWindow := Classes.AllocateHWND(WindowEvent);
TMyForm=class(TForm)private procedure WndProc(var TheMessage : TMessage); override;end;procedure TMyForm.WndProc(var TheMessage : TMessage);begin if( TheMessage.Msg=WM_ACTIVATE )then begin //do anything end; inherited WndProc( TheMessage ); end;