Do some adjustments on the following code.
private void OpenForm(Form form)
{
PositionReporterEdge(form);
form.Show();
}
private void PositionReporterEdge(Form form)
{
int screenHeight = Screen.PrimaryScreen.WorkingArea.Height;
int screenWidth = Screen.PrimaryScreen.WorkingArea.Width;
Point parentPoint = this.Location;
int parentHeight = this.Height;
int parentWidth = this.Width;
int childHeight = form.Height;
int childWidth = form.Width;
int resultX;
int resultY;
if ((parentPoint.Y + parentHeight + childHeight) > screenHeight)
{
resultY = parentPoint.Y + 100;
resultX = parentPoint.X + 50;
}
else
{
resultY = parentPoint.Y + parentHeight;
resultX = parentPoint.X;
}
form.Location = new Point(resultX, resultY);
}