I am creating a simple dialogue window in C#, and want to remember where it is placed so that I can open another in the same place later (during the same application run, so no need for config files etc). I can easily save the Location (a Point) or the Bounds (a Rectangle), but on creating another form, calling form.ShowDialog()
resets both:
Form form= new Form();
form.Location = ptSavedLocation;
//now form.Location is correct
form.ShowDialog();
//now form.Location is default again, and form is displayed where I don't want it.
How can I get the form to respect its Location (or Bounds, or any other appropriate property / setter) ? Thanks!