My application opens a child window.
I always want this application to open just to the right of my main window, unless that puts it off screen, in which case I'll go left unless that puts it off screen in which case I'll change the whole thing to default position.
So I have the start
But how do I go about verifying that rightTop is visible, or childstart is visible, or neither are visible so I can apply the proper logic?
Thanks.
I always want this application to open just to the right of my main window, unless that puts it off screen, in which case I'll go left unless that puts it off screen in which case I'll change the whole thing to default position.
So I have the start
Code:
_childForm = new childForm();
Point childstart = new Point(this.Location.X + this.Width + 2, this.Location.Y);
Point rightTop = new Point(childstart.X + _childForm.Width, childstart.Y);
_childForm.Location = childstart;
_childForm.Show();
But how do I go about verifying that rightTop is visible, or childstart is visible, or neither are visible so I can apply the proper logic?
Thanks.