Minimizate controls in your form
|
This more than a trick... it is a curiosity. All the Delphi controls derived of TWinControl, for Windows are not more than windows. Keeping this in mind... what happens if for example, we minimizate a TMemo or a TButton? Test it and you will see it:
|
procedure TForm1.Button1Click(Sender: TObject); Procedure MinimizaEn(Que:THandle;X,Y:integer); var Posiciones: TWindowPlacement; begin Posiciones.length:=SizeOf(Posiciones); GetWindowPlacement(Que,@Posiciones); Posiciones.flags:=WPF_SETMINPOSITION; Posiciones.ptMinPosition.x:=X; Posiciones.ptMinPosition.y:=Y; SetWindowPlacement(Que,@Posiciones); CloseWindow(Que); end; begin MinimizaEn(Memo1.Handle,20,30); end; |