ba272
asked on
How do I control a child dialog's initial location?
Would someone be so kind as to tell me how, using C#, I can specify that a dialog will be drawn at the same location each time it's opened, which would require me to disable the cascading window default, where each new window is in front of and a little lower than the one opened before it?
Thanks,
RA
Thanks,
RA
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
// Shows dialog in desired location
private void ShowChildForm(Point DesiredLocation)
{
ChildDialogForm f = new ChildDialogForm();
f.StartPosition = FormStartPosition.Manual;
f.Location = DesiredLocation;
f.ShowDialog(this);
}
//Sample: how to call
private void button1_Click(object sender, System.EventArgs e)
{
ShowChildForm(new Point(10,10));
}