private void AdjustPosition(object sender, EventArgs e) { var parent = sender as Form; if (parent != null) { this.Location = parent.PointToScreen(Point.Empty); this.ClientSize = parent.ClientSize; } }