Código Delphi [-] var P: TPoint; begin P := Self.ClientToScreen(ListView1.BoundsRect.TopLeft); Form2.Left := P.X + (ListView1.Width - Form2.Width) div 2; Form2.Top := P.Y - Form2.Height; if Form2.Top < 0 then Form2.Top := 0; Form2.Show; end;
var P: TPoint; begin P := Self.ClientToScreen(ListView1.BoundsRect.TopLeft); Form2.Left := P.X + (ListView1.Width - Form2.Width) div 2; Form2.Top := P.Y - Form2.Height; if Form2.Top < 0 then Form2.Top := 0; Form2.Show; end;